Embed a highly customisable radio player for your website out of the box, or tailor it to suit your needs. There are lots of features at your disposal via our player API, view our simple guide on how to get started below!

Note: The DIY Player kit is intended for use by persons familiar with web development and is provided 'as-is'. Radio.co support does not cover use of the DIY Player Kit.

Getting Started

getting started

Paste the following code between the <HEAD></HEAD> tags of your web page.

<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script><script src="https://public.radio.co/playerapi/jquery.radiocoplayer.min.js"></script>

Paste the following code just after the closing </BODY> tag of your web page.


The Player Element

getting started

Define where you want the player to be located. Copy the following code to where you want the player to be located:

<div class="radioplayer" data-src="<em><strong>https://streaming.radio.co/your_station/listen</strong></em>" data-autoplay="false" data-playbutton="true" data-volumeslider="true" data-elapsedtime="true" data-nowplaying="true" data-showplayer="true" data-volume="50" data-showartwork="false"></div>

You can change the options which are prefixed with a data-, with the preset options our default player will display, for a full list of options see below.

DIY Player Kit Examples

example music player nbcexample music player website

Download our project showcase folder which shows examples of different ways our API can be used within your website. Download the example projects gallery.

These files contain real working example players which can be manipulated and used in your own projects, they contain all of the code allowing you to get up and running

Player Options

The options passed to the referenced HTML element on the web page, these options control certain functionality and visibility of some elements.


Your radio.co listen stream URL, required to set up the player


Automatically start playing the stream when the page loads


Display a play and pause button on the page


Display the volume slider on the page


Display the current now playing information of the station


Display the current streaming total elapsed time on the page


Show or hide the radio player from the page, use in conjunction with displaying only certain elements.


Set the initial volume of the stream when the page loads, requires a number between 1 and 100.


Display just the artwork of the currently playing song (use with data-showplayer='false').


Changes the square image on the player to a custom image source.


Sets a custom background image behind the player.


Set the initial volume of the stream when the page loads, requires a number between 1 and 100.


Methods which allow further control over your player's functionality and event mechanisms.


Load the stream source into the player.


Play the stream.


Pause the stream.

playToggle(<em>playCallback</em>, <em>pauseCallback</em>)

If the radio is playing this method will pause it and vice versa.

event(event, <em>callback</em>)

Listener for Radio.co player events and execute a callback function.


Return the time elapsed time, add true to the parameter to format the returned time.


0 → No information on the status

1 → Metadata for the stream is ready

2 → Data for the current playback position is available but not enough to play

3 → Data for the current and at least the next packet is available

4 → Enough data available to start playing

getArtwork(width, height, callback, resolution)

Get currently playing track artwork at a certain dimension and quality.


If a parameter is not present this will return the volume of the player, if one is then it will set the volume. 0 (muted) - 100 (max)


Immediately mute the volume of the stream.


Returns the boolean on whether the stream is currently playing or not.

event(event, <em>callback</em>)

Listen to events triggered by the player and executes a callback function when the event occurs.


Return true or false to wether the station has already been loaded previously.


Events can be caught using player.event('event_name', callback) to execute the callback when the event is triggered.


When the audio has been loaded to the player successfully.


Fired after each second passed while listening to the stream.


When the user plays the stream.


When the use pauses the stream.


Not a valid source of stream


The current playing song has changed on the station.


No stream information was recieved


var player = $('.radioplayer').radiocoplayer();
player.event('audioPlay', function(event){
 //perform action when audio is played here

Ready to get started?

Join over 44,100 broadcasters who chose Radio.co

Smiling radio broadcaster

Create your station in less than 60 seconds, for free.

Pick a plan, cancel anytime, no hardware needed

Smiling radio broadcaster

Take a tour with a radio specialist and ask us anything.

No obligation, just a helping hand