API Widgets - Players Back to all widgets
Embed your station's radio player in your website.
These are based on a customised version of jPlayer that uses HTML5 Audio on browsers that support it (e.g. Webkit-based browsers like Chrome & Safari) and falls back to a Flash-based player (still using the same an HTML/CSS user interface) on browsers that don't (e.g. Firefox, Internet Explorer). Added benefit: since most modern mobile web browsers are based on Webkit, this player will work fine on most modern smartphones. The player will detect a loss of connection and attempt reconnection to the stream.
These widgets rely on three parts to work:
- The Javascript code. The main script needs to be included from radiojar.com. It includes our own version of jQuery that uses the noConflict mechanism to avoid clashing with your own website's jQuery (if present).
- The HTML markup. Use the code provided, you can tweak it and add your own elements if you want as long as you keep the basic functioning parts that allow the Javascript code to work.
- The CSS. A starter stylesheet file is provided here as an example. Feel free to link to it directly, or download it and tweak it to arrive at a design that matches your website's look & feel. These widgets use the Font Awesome web font (for the play/pause/mute icons) which is linked directly from Radiojar in the starter CSS.
Check out the live demos below and click to get instructions for using the code on your website.
Minimal player
Just a play button
Show code

Minimal player with mute
Play button & mute/unmute control
Show code

Full Player
Display artist/track name & album art, hover on the mute button to adjust volume.
Now playing:
Artist - Song
Please note that to accurately show track information, you will need to upload appropriately tagged MP3 files to Radiojar's media library.
You can edit all the relevant meta-data directly from the Media Library.
