WorldRadios documentation

Laravel radio directory · Now Playing · Android & iPhone app · VIP subscriptions

What it does

While a listener is on a station page — or listening anywhere on the site or in the app — WorldRadios asks the station which song is on air and shows the title, artist and album artwork, plus the songs played before it.

Station page with the song on air

The answer is cached on the server and shared by every listener, so a busy station is asked once per interval no matter how many people are listening.

Settings — Admin → Now Playing

Now Playing settings
Show the song that is playingSwitches the whole feature on or off.
Check for a new song every … seconds5–300. 10 or 15 seconds feels instant.
Give each station up to … secondsHow long a station may take to answer.
Recently played list / how many songsShow the songs before the current one, 1–50 (10 or 15 is typical).
Keep in the databaseHow many songs per station are stored.
Where the song appearsPlayer bar, phone lock screen, album artwork look-up, Android app.

Test a stream takes any stream address (or a station) and shows which song it sends and every step of how it was found.

Per station

Now Playing on the station editor

On Stations → Edit you can switch song titles off for one station, or enter a custom metadata address when the station publishes its song somewhere else: AzuraCast, Radio.co, Icecast status-json.xsl, Shoutcast 7.html or stats?json=1, most JSON “now playing” links, or a plain-text title. Detect the song now checks it immediately. The station list's bulk actions switch titles on or off for many stations at once.

How the song is found

  1. The custom metadata address, when the station has one.
  2. ICY metadata inside the stream (Icecast, Shoutcast) — playlists (.pls, .m3u, .asx, .xspf) and redirects are followed.
  3. The title in an HLS (.m3u8) playlist.
  4. The server's status page: Icecast /status-json.xsl, Shoutcast 2 /stats?sid=1&json=1, Shoutcast 1 /7.html.

Stations that do not send a title simply show “Live broadcast”. Artwork comes from the iTunes Search API when switched on.

API

GET /api/now-playing/{station id}                 (website)
GET /api/app.php?action=nowplaying&slug={slug}    (app)