Using Wimpy with Radionomy

 

Disclaimer: Wimpy was designed for "progressive download" streaming. However, the technologies used to playback media may also extend support "real streaming", but we can not gaurentee that all "real" streaming servers will play properly through Wimpy.

Before You Begin

1. Install Wimpy on your site using the standard installation proceedure (upload the wimpy files to a folder on your site). You should also get comfy with Customizer and understand the code used to display a player.

2. Download the StreamInfoRadionomy.zip package:

Download

 

3. In the download packge there is an example.html file -- we recommend working with this example file before modifying pages on your site. Modify the example.html file so that it is configured to use the files on your site and to connect to your radio station.

Here's what the example.html file looks like:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Wimpy Player</title>

<!-- Wimpy Engine -->
<script src="wimpy/wimpy.js"></script>

<!-- Radionomy Info Parser for Wimpy-->
<script src="StreamInfoRadionomy.js"></script>

<script>

// See StreamInfoRadionomy.js for more information on each parameter.
StreamInfoRadionomy({
	player 		: "myPlayer", // The ID for the player DIV on your page.
	listenURL 	: "http://listen.radionomy.com/wimpy", // try http or https
	guid 		: "8f255562-3f11-406b-8d98-f98cb23c84ec",
	apikey 		: "4842dc4c-d6e0-4ab3-986b-412fd7d6aeab", 
startOnLoad : true,
listenTitle : "Wimpy Radio", // Used in the playlist, if the player skin has a playlist adTitle : "Advertisement", // Displayed in conjunction with listenTitle when an advertisement is playing. (listenTitle is used for the "artist" slot in the player) onChangeTrack : pingMe // A function to ping when a change is detected. Returns an object containing artist, title, album, image.
});

function pingMe(obj){
for(var prop in obj){
console.log(prop + " : " + obj[prop]);
}
} </script> </head> <body> <!-- Wimpy Player --> <div id="myPlayer" data-wimpyplayer data-media="none"></div> </body> </html>

 

NOTE: Some features will not be available when connecting to a streaming server, including:
- Scrubber -- normally used to advance to a new position in a song.
- Playlists -- when connecting to a streaming server, there is only one thing to player -- which is the connection to the server.
- Time -- a streamign server plays continually, hence there is no beginning, current nor end time.
- ... and many other features related to "files".

The StreamInfoRadionomy function accepts one object as an argument, containing the following paramters:

player
The ID for the player DIV on your page. Or if you're using Javascript to render a player, a reference to a player object.

listenURL
Generally this will be:
http://listen.radionomy.com/YOUR_RADIO_NAME
... where YOUR_RADIO_NAME is the name of your radio station.
NOTE: You may need to change https to http, depending on your environment.

guid & apikey
These 2 parameters are used to connect to the Radionomy Rest API. They are
- Go to RadioManager and select your radio station
- Click "settings" fomr the top menu
- Click "Technical Info" from the side menu

startOnLoad
Will attempt to start playback as soon as possible. Note that some devices/browsers don't support this feature (click here for more info on why).

listenTitle
Will be used in the player's playlist (if the player skin includes a playlist). Also used during advertisements in the "artist" field of slot.

adTitle
Displayed when an advertisement is playing.

onChangeTrack
A function to ping when a change is detected. Returns an object containing artist, title, album, image.

Setting up a player

After you've successfully connected to your server, you can use Customizer to configure the player.

There are 2 important things you'll need to do the the HTML code you get back from Customizer:

1. Include an "id" in the player DIV.

2. Set the "data-media" option to "none"-- because the StreamingInfoRadionomy script automatically connects to your server for you.

 

Version Notes

Version 6 - 2016-11-17
Added onChangeTrack handler.

Version 5 - 2016-05-13
Updated the stop() call to include the proper argument for the latest version of wimpy ( >= v7.7.44 ), without this argument, streams may not disconnect properly.

Version 4 - 2016-50-04
Many fixes.