How to change a stream in the web console

Because each station hosts their own console, it can be confusing when you need to change the URL of your streams – particularly if you also have mobile streams. This is because, while mobile streams can be altered just by logging in to the Station Control Panel, web console streams can only be changed by editing markup or generating the console again.

The quickest option

If you’ve not made extensive customizations to your console (such as elaborate use of your content (plugin) space) it is much faster to login to the Station Control Panel and re-generate a new console. It’s also less error-prone this way. Simply run the console generator, take the zip it gives you, extract it and upload it to the same folder as your existing console. If you’re comfortable with what you’re doing, then unless you’ve changed colours and logos during re-generation, you only need to upload the index.html file. If you’ve changed more than that, then do upload the whole thing, overwriting the files on the server.

If you’re comfortable with HTML editing

First, download/obtain a copy of the console’s index.html from your site and open it in your favourite text editor

Scroll a few lines in and you’ll see a whole load of JavaScript variables including one section marked

/**
* Audio Settings (V3 API)
*/

This block lets your control the various parameters which set what stream the station plays.

audioLive – if the above stream/endpoint points to a live stream, set this to true.

If you’re playing an On Demand (listen-again/catchup), set this to false

audioType – set this according to whether the stream is http, rtmp or something else. If your stream URL is in fact a playlist (ie. URL ends .pls or .m3u) then you must set the value here to playlist regardless of the type of streams listed in the playlist. For MPEG4 streams, over HTTP, usehttpmp4m4a and for MP3 streams (Shoutcast/Icecast) over HTTP use http

audioUrl – if your stream is a playlist or a Shoutcast/Icecast stream you will have a URL which might look like http://mystream.com:8000 or similar. The URL should be stated here. Note that for Shoutcast streams not contained within a playlist, you may need to use the ;stream.mp3 suffx. For rtmp streams, it’s a little different so leave this field blank (In other words var audioUrl = “” is what you’re putting)

audioServer – for rtmp only, you should state the server. For everything else, leave the value empty (set to “”)

audioEndpoint – for rtmp only, you should specify the endpoint. Again if you’re not using RTMP, leave the value empty (set to “”)

bufferTime – a setting further down does not need to be adjusted unless you’ve had instruction from Radioplayer Operations to do so.

Further down, you will see the section:

// — Add your HTML5 supported stream details here
var audioHTML = [{
audioType: ‘http’,
audioUrl: ‘http://radio.canstream.co.uk:8045/live.mp3’
}];

The HTML5 stream has to be an mp3 stream and cannot be a playlist or anything else. Nothing else is compatible. So:

audioType will always be set to http

audioUrl needs to be a stream that must end in .mp3

Update those values and you’re done. Save this file.

Now you might not be able to test it locally in browser, due to flash security issues (the power users amongst you will know how to get around this). So the best bet is to upload it to a dev server (together with the rest of the console code, otherwise it won’t work in the slightest) and preview it there. If it’s playing the new stream, then great – publish it to your live site. If not, revisit the steps above carefully. Also, check the new stream actually plays in VLC or Winamp.

Radioplayer Knowledge Base has written 40 articles

We’ve put together a handy guide to get you set up quickly in Radioplayer. As you know, the Radioplayer console is a browser-based application which is hosted by your station, so before you begin, you’ll need someone who knows their way around your website and has FTP access.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>