# Radio Live stations, for the hour you're in the gym. Open **Música → Radio**, pick a genre, press a station, and it plays while you train — across screens, with the screen locked and the phone in your pocket. It is radio, not a music library: you don't pick the song, and nobody has to. That is the whole reason it exists next to the Apple Music playlists on the same screen — one is what you listen to on purpose, the other is what plays while you count reps. ## What is playing There is also a **search box** above the tabs, and it searches the directory rather than the page you are looking at: *jazz* is every jazz station radio-browser knows, not the jazz stations that happened to be in the genre on screen. Results are ordered by the name first — a station *called* "Jazz 24" comes before one with "jazz" buried in a forty-character marketing name — and then by how many people listen. The curated channels and mixes that match come first of all: no advertising, and a stream already known to work. Chips pick a genre. Ten of them: **Workout / Rave, Techno / House, R&B / Soul, Latina, Hip-Hop, Reggae, Chill, Jazz, Rock, Electrónica**. Each one is a list of **SomaFM** channels (curated by hand — a machine cannot know that *Seven Inch Soul* is the R&B one), the **Radio Paradise** mixes that fit, and the **radio-browser** tags that fill in the rest. The ad-free ones come first in every genre: SomaFM is a listener-supported, commercial-free network of 46 channels, and Radio Paradise is four hand-mixed ones. Both publish their stream as a playlist `.pls`, which `api/radio.js` reads rather than guessing a bitrate into a URL — that is what makes the same code work for every channel, including the ones added after this was written. Behind them is [radio-browser](https://www.radio-browser.info), a public, community-run directory of tens of thousands of stations. It is filtered hard: **HTTPS only** (a page served over HTTPS cannot play an `http://` stream at all — the browser blocks it as mixed content, so offering one would be offering a station that silently does nothing), `hidebroken=true`, ordered by how many people actually listen to it. ## Where the audio goes **From the station to your phone. Never through this server.** The api hands out the list — each station with its stream URL already resolved — and after that it sees nothing: no traffic, no disk, no byte of audio. On a small VPS that is the difference between a feature and a bandwidth bill, and it is also why nothing here ever downloads, records or keeps a copy of anything. Two kinds of request *do* reach out from the server, and both are for the list and its caption: | Call | To | Why | |---|---|---| | channel list + `.pls` | somafm.com | to resolve a channel into a stream URL | | `bytagexact` search | all.api.radio-browser.info | the directory's stations per genre | | `now_playing` | api.radioparadise.com | the cover and the track for the bar | All of them are cached for ten minutes, so opening the screen twice is one round of requests. Every outgoing call goes through one function with a **host allowlist** (`RADIO_HOSTS`) — the api container sits on the owner's own network, so the set of hosts it will talk to is a security boundary, not a convenience. So the server does see something: which genre chip was pressed, and — only for the two sources that publish what they play — which station the bar is asking about, once every 45 seconds while it plays. Nothing is written down: those are requests, not records, and there is no table, log or file where listening would accumulate. (The request log in the admin dashboard is the activity log, and it carries sign-ins and admin actions, not this.) ## Why the stream URL arrives in the list iOS only lets audio start **inside the gesture** that asked for it. Anything asynchronous between the finger and the `play()` — a `fetch`, a state update, a re-render — is a press that does nothing, with no error anywhere. So the list arrives complete: by the time a station has been drawn on the screen, its stream URL is already in the object the row holds, and the press calls `play()` synchronously. The `