Muses Radio Player
Main Home What is Muses Radio Player Set up your player Skins Working examples FAQs Sponsoring plans
Project Details Download player License Related projects Changelog Source code
Community Sites using Muses Community Skins Feedback & support How to contribute Thanks









Frequently asked questions

How can I display metadata (artist and track name) information with Muses?

Muses has two ways of displaying metadata:
1) Inside the player
2) Passing metadata information to you using a javascript callback event (read how to enable jsEvents here)

On both cases, you first need to enable the metadata fetching fetching by adding the option 'metadataMode' parameter to your code. This option may have one of two possible values 'icecast' or 'shoutcast' depending on your streaming server.

Here is an example on how to set this option for a shoutcast server:

MRP.insert({
'url':'http://192.241.214.243:9020/;',
'codec':'mp3',
'volume':65,
'autoplay':true,
'buffering':5,
'metadataMode':'shoutcast', // <-- Add this line
'title':'Radio Vermont',
'welcome':'WELCOME TO...',
'bgcolor':'#FFFFFF',
'skin':'mcclean',
'width':166,
'height':83
});

Once you've done this, muses will try to get metadata information for your station every 20 seconds. If you want to change that value, you can add the 'metadataInterval' option like this:

'buffering':5,
'metadataMode':'shoutcast',
'metadataInterval': 15, // <-- Add this line for 15 seconds
'title':'Radio Vermont',

Be advised We strongly recommend that you never set this to a value lower than 10 seconds (setting this value to low, can saturate your streaming server if you have many simultaneous listeners).

Finally, if you're using an old streaming server, there's the chance that cross-domain restrictions avoid muses to grab metadata from your server. If this is the case (you may be able to see cross-domain errors on your browser console log), you may need to use a 'metadataProxy' option. This option allows you to set the URL of some endpoint on your server (made in PHP, NodeJS, Python or any language you like) were muses will call to get the metadata information.

Here's a really basic sample on how to implement that endpoint in PHP: proxy.php sample GitHub

Be advised: Don't use this sample as is. You must add some validation to the URL get parameter (or you'll end up creating an open proxy to malicious users).



More FAQs