Help Center Widgets & Links

Widgets & Links

2 min read Last updated: May 04, 2026

Beyond the web player, CloudRadio provides a JavaScript widget for showing live stream info on your site, and downloadable listen links for desktop media players. You'll find ready-to-copy code snippets in your radio's Widgets & Links page in Studio.

JavaScript Widget

The JavaScript widget updates HTML elements on your page with live stream metadata. It doesn't render a player UI, so you can build your own display and style it however you like.

Get the Code

  1. Open your radio in Studio
  2. Go to Widgets & Links in the sidebar
  3. Copy the script tag from the top of the page

The script tag looks like this:

<script src="https://public.cloudrad.io/your-subdomain/streaminfo.js"></script>

Your subdomain is already filled in. Just paste it into your website's HTML.

Then add elements with the following IDs wherever you want the data to appear. Each widget card on the Widgets & Links page shows a live preview and a copy button for the corresponding HTML snippet.

Element IDData displayed
stream_info_songCurrent song title and artist
stream_info_titleStation name
stream_info_bitrateStream bitrate
stream_info_listenersCurrent listener count
stream_info_sourceStream source URL
stream_info_songhistoryRecent song history

Example

<p>Now playing: <span id="stream_info_song">Loading...</span></p>
<p>Listeners: <span id="stream_info_listeners"></span></p>

The widget polls for updates every 10 seconds. You only need to include the elements you want. Any missing IDs are ignored.

Song History

For the song history element, add a data-count attribute to control how many entries to display:

<div id="stream_info_songhistory" data-count="5"></div>

Values from 1 to 100 are supported. If omitted, the default count is used.

CloudRadio generates playlist files that open your stream in desktop media players like Winamp, VLC, or Windows Media Player. You'll find all available links with copy buttons on your radio's Widgets & Links page under Direct Links.

The URL format is:

https://embed.clrd.net/api/your-subdomain/listen.pls

Supported Formats

FormatFileUsed by
PLSlisten.plsWinamp, foobar2000, VLC
ASXlisten.asxWindows Media Player
RAMlisten.ramRealPlayer
QTLlisten.qtlQuickTime

Browsers do not play these playlist files inline. They download them and hand them off to the system media player. Use the web player for in-browser listening.

If your radio has multiple mount points, specify the mount in the URL:

https://embed.clrd.net/api/your-subdomain/mountname/listen.pls

For AutoDJ stations, the URL uses the station slug:

https://embed.clrd.net/api/autodj/your-station-slug/listen.pls

Add to Your Website

Copy the listen link from your radio's Widgets & Links page and use it as a download link:

<a href="https://embed.clrd.net/api/your-subdomain/listen.pls">
  Open in media player
</a>

Stream Info API

For advanced integrations, you can query stream metadata directly as JSON:

GET https://embed.clrd.net/api/your-subdomain/info.json

This returns current song title, artist, listener count, bitrate, and song history.

Optional Parameters

ParameterDescription
history_format=jsonReturns structured history with cover art URLs
history_count=10Number of history entries (1 to 100)

Example:

https://embed.clrd.net/api/your-subdomain/info.json?history_format=json&history_count=10

The API supports CORS and can be called from any domain. Responses are cached for 5 seconds.

Still need help?

If you couldn't find the answer, our team is here to help.

Open Support Ticket