Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

SHOUTcast Metadata - Title and Artist display


Hello,


How is possible to display streaming title and artist metadata from shoutcast streaming in JWPlayer?
Is there any way to display this on player screen and to be updated in real time?

Thank you

Regards,
Florin

94 Community Answers

JW Player

User  
0 rated :

Use AJAX with a serverside script to retrieve the data. Position the Title and Artist text over the player with CSS.

See the Shoutcast and Icecast forums for the scripts.

This functionality is *_NOT_* built into the JW FLV Media Player.

JW Player

User  
0 rated :

Hello kLink
and thanks for replay;


Can you give me please more details about this or some example?

Thanks

Regards,
Florin

JW Player

User  
0 rated :

To make this work:

1)place*shoutcast_class.php* on your server(Googleforit)

2)place*shoutcast_song_title.php*onyourserver
putyourshoutcastaddressinplaceoftheoneinbold

3)place*ShoutcastSongTitle.html*onyourserver
putyourshoutcaststreamURLinplaceoftheonesinbold
thecodehasJavaScriptforbothav3.xanda4.xplayer
deletetheonethatyoudon'twant
adjusttheCSStopositionandstylethetitle

You can undelete the print line in *shoutcast_song_title.php* and call it in your browser to see the full array of data available, adjust the array element to match the element that has your song title (currently [12]).

*shoutcast_song_title.php*bc.. <?php

require_once('shoutcast_class.php');

$display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");

$radio = new Radio("*broadband.eve-radio.com:8000*");

$data_array = $radio->getServerInfo($display_array);

//print "<pre>"; print_r($data_array); exit;

print "document.getElementById('title').innerHTML = '$data_array[12]';";

?>



*Shoutcast Song Title.html*bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>DisplayShoutcastSongTitle</title>

<styletype="text/css">
div.playercontainer
{
position:absolute;
top:100px;
left:100px;
width:400px;
height:40px;
z-index:0;
}

div.title
{
position:absolute;
top:102px;
left:105px;
width:400px;
height:18px;
font-size:12px;
font-family:arial;
color:#FFFF00;
z-index:1;
}
</style>

<scripttype="text/javascript"src="swfobject-2.1.js"></script>

<scripttype="text/javascript">
functionloadJsFile(filename,filetype)
{
varfileref=document.createElement('script')
fileref.setAttribute('type','text/javascript')
fileref.setAttribute('src',filename)

if(typeoffileref!='undefined')
{
document.getElementsByTagName('head')[0].appendChild(fileref)
}
};

loadJsFile('shoutcast_song_title.php?'+(Math.round(1000*Math.random())),'js')
setInterval("loadJsFile('shoutcast_song_title.php?'+(Math.round(1000*Math.random())),'js')",30000);
</script>

<scripttype="text/javascript">
varflashvars=
{
file:encodeURIComponent('*http://broadband.eve-radio.com:8000/;stream.nsv*'),
type:'sound',
frontcolor:'86C29D',//text&icons(green)
backcolor:'849BC1',//playlistbackground(blue)
lightcolor:'C286BA',//selectedtext/trackhighlight(pink)
screencolor:'000000',//screenbackground(black)
autostart:'true'
};

varparams=
{
allowfullscreen:'false',
allowscriptaccess:'always',
bgcolor:'#000000'
};

varattributes=
{
id:'playerId',
name:'playerId'
};

swfobject.embedSWF('player-4.3.91.swf','player','400','40','9.0.124',false,flashvars,params,attributes);
/*
varflashvars=
{
file:encodeURIComponent('*http://broadband.eve-radio.com:8000/;stream.nsv'*),
type:'mp3',
width:'400',
height:'40',
frontcolor:'0x86C29D',//text&icons(green)
backcolor:'0x849BC1',//playlistbackground(blue)
lightcolor:'0xC286BA',//selectedtext/trackhighlight(pink)
screencolor:'0x000000',//screenbackground(black)
autostart:'true'
};

varparams=
{
allowfullscreen:'false',
allowscriptaccess:'always',
wmode:'opaque',
bgcolor:'#000000'
};

varattributes=
{
id:'playerId',
name:'playerId'
};

swfobject.embedSWF('mediaplayer-3.16.swf','player','400','40','7',false,flashvars,params,attributes);
*/
</script>

</head>

<body>

<divid="title"class="title">
Title
</div>
<divid="playercontainer"class="playercontainer">
<aid="player"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a>
</div>

</body>

</html>



JW Player

User  
0 rated :

More thoroughly tested with the v4.2.x player (that means my mistakes are fixed :D).bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>DisplayShoutcastSongTitle</title>

<styletype="text/css">
div.playercontainer
{
position:absolute;
top:100px;
left:100px;
width:400px;
height:40px;
z-index:0;
}

div.title
{
position:absolute;
top:102px;
left:105px;
width:400px;
height:18px;
font-size:12px;
font-family:arial;
color:#FFFF00;
z-index:1;
}
</style>

<scripttype="text/javascript"src="swfobject-2.1.js"></script>

<scripttype="text/javascript">
functionloadJsFile(filename)
{
gid('title').innerHTML='RetrievingTitle...';
varfileref=document.createElement('script');
fileref.setAttribute('type','text/javascript');
fileref.setAttribute('src',filename);

if(typeoffileref!='undefined')
{
document.getElementsByTagName('head')[0].appendChild(fileref);
}
};

setInterval("loadJsFile('shoutcast_song_title.php?'+(Math.round(1000*Math.random())))",30000);


functiongid(element)
{
returndocument.getElementById(element);
};
</script>

<scripttype="text/javascript">
varflashvars=
{
file:encodeURIComponent('http://broadband.eve-radio.com:8000/;stream.nsv'),
type:'sound',
frontcolor:'86C29D',//text&icons(green)
backcolor:'849BC1',//playlistbackground(blue)
lightcolor:'C286BA',//selectedtext/trackhighlight(pink)
screencolor:'000000',//screenbackground(black)
autostart:'true'
};

varparams=
{
allowfullscreen:'false',
allowscriptaccess:'always',
wmode:'opaque',
bgcolor:'#000000'
};

varattributes=
{
id:'playerId',
name:'playerId'
};

swfobject.embedSWF('player-4.2.90.swf','player','400','40','9.0.124',false,flashvars,params,attributes);
</script>

<scripttype="text/javascript">
varplayer=null;
varloadJs=true;


functionplayerReady(obj)
{
player=gid(obj.id);
player.addModelListener('STATE','stateMonitor');
};


functionstateMonitor(obj)
{
if((obj.newstate='PLAYING')&&(loadJs==true))
{
loadJsFile('shoutcast_song_title.php?'+(Math.round(1000*Math.random())));
loadJs=false;
}
};
</script>
<!--
<scripttype="text/javascript">
varloadJs=true;


functiongetUpdate(typ,pr1,pr2,pid)
{
if((typ=='time')&&(pr1>0)&&(loadJs==true))
{
loadJsFile('shoutcast_song_title.php?'+(Math.round(1000*Math.random())));
loadJs=false;
}
};
</script>

<scripttype="text/javascript">
varflashvars=
{
file:encodeURIComponent('http://broadband.eve-radio.com:8000/;stream.nsv'),
type:'mp3',
width:'400',
height:'40',
frontcolor:'0x86C29D',//text&icons(green)
backcolor:'0x849BC1',//playlistbackground(blue)
lightcolor:'0xC286BA',//selectedtext/trackhighlight(pink)
screencolor:'0x000000',//screenbackground(black)
enablejs:'true',
autostart:'true'
};

varparams=
{
allowfullscreen:'false',
allowscriptaccess:'always',
wmode:'opaque',
bgcolor:'#000000'
};

varattributes=
{
id:'playerId',
name:'playerId'
};

swfobject.embedSWF('mediaplayer-3.16.swf','player','400','40','7',false,flashvars,params,attributes);
</script>
-->
</head>

<body>

<divid="title"class="title">
Title
</div>
<divid="playercontainer"class="playercontainer">
<aid="player"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a>
</div>

</body>

</html>



JW Player

User  
0 rated :

hello friend kLink,

in the first code at shoutcast_song_title.php file has a: require_once('shoutcast_class.php');

it's require shoutcast_class.php file!!!


where I can find that?


Hi Florin, u are here? how are you cara? hehe

regards.

JW Player

User  
-1 rated :


@Cleiton,
bc.. 1) place shoutcast_class.php on your server (*Google for it*)


You know Google???

:D

JW Player

User  
-1 rated :

Oh my God,

forget my question above, sorry my fault!

I have google it and found it

thank you for the script!

JW Player

User  
-1 rated :

Dear kLink,

do u have some online workaround example of jwplayer with artist and title?

cheers.

JW Player

User  
-1 rated :

@Cleiton,

What do you mean by_"workaround example"_???

JW Player

User  
-1 rated :

sample online for look! some radio station using this script right now! understand me? :d

sorry my bad english.

JW Player

User  
-1 rated :

@Cleiton,

You can see the code posted above at:

*http://willswonders.myip.org:8085/php/Shoutcast Song Title.html*

JW Player

User  
-1 rated :

very nice station :D

this works only with mp3 stream? what about rtmp protocol from flash server?

many thanks for your help!

JW Player

User  
-1 rated :

@Cleiton,

This application was written for Shoutcast/Icecast servers which have the data (Title, Users, etc.) available in a serverside application.

For RTMP, or any other method of serving media files, there would have to be a serverside application that supplied the data. If you were serving a continuous stream of media (songs, video, etc.), the application that queued up the media could provide that data, then the client just requests the data every 30 seconds or whatever is appropriate for the application.

JW Player

User  
-1 rated :

Hi kLink,

I got most of this working, however when I print out the array the current song is blank... do you have any ideas on how I could make it, unblank?

JW Player

User  
-1 rated :

nevermind got it ;)

JW Player

User  
-1 rated :

Hello,

There is not another solution to dislay on JWPlayer as a capture text or as subtitle? Or is not another solution to get the Title and Artist from /7.html file not from XML (for xml is required admin password on shoutcast).

Thanks

Regards,
Florin

JW Player

User  
-1 rated :

Hi again KLink,

how to insert this code on JWPLAYER?

I get this on php running in my server:

document.getElementById("title").innerHTML = "Spooks - Things Ive Seen Aural Mix";

thanx.

JW Player

User  
-1 rated :

See the player page in my post of 10.11.2008 above.

JW Player

User  
-1 rated :

Hi kLink,

sorry I don't understand!

Im talking about 7.html code above!

how to?

thank you

JW Player

User  
-1 rated :

The code that I posted today *_DOES_* use the 7.html. Look at line 10.

You can use that PHP script in the player page that I posted on 10.11.2008. Just name it *shoutcast_song_title.php* when you upload it to your server.

JW Player

User  
-1 rated :

Hello,
and thanks for replay


Is there any another solution non php (flash or to be integrated on jwplayer)?

On Wowza server i found a player and for metadata information from SHOUTcast server use this AS (Maybe the developer do something in this way and include this for future version):

bc.. enablePlayControls(false);

metaDataValues["title"] = "";
metaDataValues["genre"] = "";
metaDataValues["name"] = "";
metaDataValues["url"] = "";
}

function updateMetaData()
{
var metaStr = "";
if (metaDataValues["title"] != "")
metaStr += "Title: "+metaDataValues["title"]+"\n";
if (metaDataValues["genre"] != "")
metaStr += "Genre: "+metaDataValues["genre"]+"\n";
if (metaDataValues["name"] != "")
metaStr += "Name: "+metaDataValues["name"]+"\n";
if (metaDataValues["url"] != "")
metaStr += "URL: "+metaDataValues["url"]+"\n";
metaDataText.text = metaStr;
}



JW Player

User  
-1 rated :

please JeroenW reply something about!!

it's possible? to implement this feature in the player? or plugin?


thanks in advance.


JW Player

User  
-1 rated :

Hello,

So interesting, when we put a problem, or we ask something so important ... become silence, and no answer from developers or from somebody else.

Thanks

JW Player

User  
-1 rated :

Yeah Florin friend,

no response :-(

JW Player

User  
-1 rated :

Seems like you were given an awful lot of *_FREE_* code to display the artist/title in two different ways.

Smells very much like *_UNGRATEFUL_* to me.

If you want/need a plugin, I'd suggest that you write it yourself instead of leeching anymore of someone else's work try contributing something.

JW Player

User  
-1 rated :

Hey hi kLink Good day!

Thanks for the code. & u truly EXPLAIN in detail!!! It worked for me. Thanks a ton!!!

Dont let others stop you from helping others ;)

Keep up the good work!!!

JW Player

User  
-1 rated :

Hi kLink,

I didn't say is not help me your code, but i'm looking for a flash solution not ajax java or php tricks. I'm not flash as programmer from that reason i ask here for a solution.

Thanks

Regards,
Florin

JW Player

User  
-1 rated :

Hey,
I can't get this working. Dunno why i placed all files in the right place (shoutcast_class.php , shoutcast_song_title.php and Shoutcast Song Title.html )


It's display this instead of displaying the song name
bc.. getServerInfo($display_array); //print "

"; print_r($data_array); exit;

print "document.getElementById('title').innerHTML = '$data_array[12]';";

?>

JW Player

User  
-1 rated :

Check that you have the full file *shoutcast_song_title.php* on your server and call it with your browser *http://www.mydomain.com/path/shoutcast_song_title.php* to see any error messages.

JW Player

User  
-1 rated :

Hmm what are you referring when you say server. It's my domain server right ?
Let's say i don't have a website, domain etc ; I tested locally by opening shoutcast_song_title.php with firefox and the error is error that i posted in previous post
It's impossible to not having the full file, look here : http://petrikx.ampaste.net/f10875068 (the code of shoutcast_song_title.php )

JW Player

User  
-1 rated :

The PHP scripts are intended to be executed on a server that supports PHP. I suppose they could be executed locally with the PHP interpreter, but i don't know what the result would be.

Install a simple server that supports PHP on your local machine, then you can call the script from it. LightTPD is a simple one-click install, then you can serve HTML, execute PHP, and stream MP4 and FLV.

JW Player

User  
-1 rated :

well i just tested shoutcast_song_title.php on a real server ( i mean on a website) and yeah it's working :p
About Shoutcast Song Title.html, is the complete script ? i mean are not missing some flashes ?

JW Player

User  
-1 rated :

*Shoutcast Song Title.html* is a complete page. If you are using a v4.x player, you can remove the v3.x player code, which is commented out. You can add any v4.x player supported flashvars to futher customize the *JW FLV Media Player*.

Review the v4.x player supported flashvars here:

*http://developer.longtailvideo.com/trac/wiki/FlashVars*

JW Player

User  
-1 rated :

florin..where are you from???what country?

JW Player

User  
-1 rated :

if you live in Romania give me your id for yahoo messenger....or add this id mihaila_adryan

JW Player

User  
-1 rated :

Hi.
How can i scroll (marquee) the title text in the player?
Thx.

JW Player

User  
-1 rated :

'shoutcast_class.php'

can any body post the damm code here :)

JW Player

User  
-1 rated :

You can find *shoutcast_class.php* here:

*http://www.letmegooglethatforyou.com/?q=shoutcast_class.php*

JW Player

User  
-1 rated :

The link is working now.

You can grab the page code from the link.

*shoutcast_stream_info.php:*bc.. <?php

//callwith:http://www.mydoamin.com/shoutcast_stream_info.php

//http://stream.stationplaylist.com:8000/
$host="stream.stationplaylist.com";//iporurlofshoutcastserver(DONOTADDHTTP://don'tincludetheport)
$port="8000";//portofshoutcastserver

$fp=@fsockopen("$host",$port,$errno,$errstr,30);

if($fp)
{
fputs($fp,"GET/7.htmlHTTP/1.0\r\nUser-Agent:GETSEVEN(MozillaCompatible)\r\n\r\n");

while(!feof($fp))
{
$data.=fgets($fp,1000);
}

fclose($fp);

//...debug
//print"<pre>$data</pre>";exit;

$data=ereg_replace(".*<body>","",$data);
$data=ereg_replace("</body>.*",",",$data);
$data_array=explode(",",$data);
$listeners=$data_array[0];
$status=$data_array[1];
$peak_listeners=$data_array[2];
$maximum_listeners=$data_array[3];
$unique_listeners=$data_array[4];
$bitrate=$data_array[5];
$track=$data_array[6];

//...debug
//print"<pre>";print_r($data_array);print"</pre>";exit;
}

$title=chop($track);
$select=explode("-",$title);
$artist=chop($select[0]);
$title=chop($select[1]);

$listenlink='http://'.$host.':'.$port.'/listen.pls';
$streamlink="<ahref=\"$listenlink\">$linktext</a>";

if($status==1)
{
//...artistandtitle
print'document.getElementById("title").innerHTML="'.$data_array[6].'";';

//...titleonly
//print'document.getElementById("title").innerHTML="'.$title.'";';
}
else
{
print'document.getElementById("title").innerHTML="Offline";';
}

?>



*shoutcast_song_title.php:*bc.. <?php

require_once('shoutcast_class.php');

$display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");

$radio = new Radio("broadband.eve-radio.com:8000");

$data_array = $radio->getServerInfo($display_array);

//print "<pre>"; print_r($data_array); exit;

print 'document.getElementById("title").innerHTML = "' . $data_array[12] . '";';

?>



JW Player

User  
-1 rated :

Is there a way to skin the player? I've tried a few different methods of applying a skin, but it breaks :( I followed the directions on how to apply a skin to flashvars, but it doesn't seem to apply to this.

skin=path/to/you/skin.swf

Otherwise, THANK YOU kLink! It's working perfect!

JW Player

User  
-1 rated :

kLink thanks for this perfect code.
I did some changes on it, by adding the Artist/Song Name, station status and radio station name. You can add everything just following my changes.


*Index.html*
bc.. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

<title>Display Shoutcast Song Title</title>

<style type="text/css">
div.playercontainer
{
position: absolute;
top: 45px;
left: 5px;
width: 400px;
height: 20px;
z-index: 0;
}

div.title
{
position: absolute;
top: 5px;
left: 10px;
width: 400px;
height: 40px;
font-size: 12px;
font-family: arial;
color: #000000;
z-index: 1;
}
</style>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

<script type="text/javascript">
function loadJsFile(filename)
{
gid('title').innerHTML = 'Retrieving Title...';
var fileref = document.createElement('script');
fileref.setAttribute('type', 'text/javascript');
fileref.setAttribute('src', filename);

if (typeof fileref != 'undefined')
{
document.getElementsByTagName('head')[0].appendChild(fileref);
}
};

setInterval("loadJsFile('shoutcast_song_title.php?' + (Math.round(1000 * Math.random())))", 30000);


function gid(element)
{
return document.getElementById(element);
};
</script>

<script type="text/javascript">
var flashvars =
{
file: encodeURIComponent('http://216.155.131.180:8210/;stream.nsv'),
type: 'sound',
frontcolor: 'ffffff', // text & icons (green)
backcolor: '000000', // playlist background (blue)
lightcolor: 'a9a9a9', // selected text/track highlight (pink)
screencolor: 'FFFFFF', // screen background (black)
autostart: 'true'
};

var params =
{
allowfullscreen: 'false',
allowscriptaccess: 'always',
wmode: 'opaque',
bgcolor: '#FFFFFF'
};

var attributes =
{
id: 'playerId',
name: 'playerId'
};

swfobject.embedSWF('player-4.2.90.swf', 'player', '400', '40', '9.0.124', false, flashvars, params, attributes);
</script>

<script type="text/javascript">
var player = null;
var loadJs = true;


function playerReady(obj)
{
player = gid(obj.id);
player.addModelListener('STATE', 'stateMonitor');
};


function stateMonitor(obj)
{
if((obj.newstate = 'PLAYING') && (loadJs == true))
{
loadJsFile('shoutcast_song_title.php?' + (Math.round(1000 * Math.random())));
loadJs = false;
}
};
</script>
<!--
<script type="text/javascript">
var loadJs = true;


function getUpdate(typ, pr1, pr2, pid)
{
if((typ == 'time') && (pr1 > 0) && (loadJs == true))
{
loadJsFile('shoutcast_song_title.php?' + (Math.round(1000 * Math.random())));
loadJs = false;
}
};
</script>

<script type="text/javascript">
var flashvars =
{
file: encodeURIComponent('http://broadband.eve-radio.com:8000/;stream.nsv'),
type: 'mp3',
width: '400',
height: '40',
frontcolor: '0x86C29D', // text & icons (green)
backcolor: '0x849BC1', // playlist background (blue)
lightcolor: '0xC286BA', // selected text/track highlight (pink)
screencolor: '0x000000', // screen background (black)
enablejs: 'true',
autostart: 'true'
};

var params =
{
allowfullscreen: 'false',
allowscriptaccess: 'always',
wmode: 'opaque',
bgcolor: '#000000'
};

var attributes =
{
id: 'playerId',
name: 'playerId'
};

swfobject.embedSWF('mediaplayer-3.16.swf', 'player', '400', '40', '7', false, flashvars, params, attributes);
</script>
-->
</head>

<body>

<div id="title" class="title">
Title
</div>
<div id="playercontainer" class="playercontainer">
<a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a>
</div>

</body>

</html>




*shoutcast_song_title.php*

bc.. <?php

require_once('shoutcast_class.php');

$display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");

$radio = new Radio("216.155.131.180:8210");

$data_array = $radio->getServerInfo($display_array);

//print "<pre>"; print_r($data_array); exit;

print 'document.getElementById("title").innerHTML = "*Radio Station::* ' . $data_array[8] . '<br />*Status::* ' . $data_array[5] . '<br />*Artist/Song Name::* ' . $data_array[12] . '";';

?>




You can check my online test here

*http://cartel.gr/and/*

it is perfectly working. Thanks again. :)

Actually I am still looking for a LIVE update for the stream stats using AJAX, I found one in a Module for WordPress. This is the link to the page:

*http://deuced.net/shout-stream/*

Maybe you can see the code and help us make a new one working with JW player and Joomla one :)


Kind Ragards,

George.


JW Player

User  
-1 rated :

You don't need to use AJAX to load a JavaScript file. That's why I wrote the code to use JS.

A "Live" update is only as live as you check the server (every 30 seconds or whatever) to see if the file has been updated.

If you check the shout-stream code, you will see a default interval of 1000ms (once per second), which is too often for a Shoutcast stream. Once per 30 seconds is probably often enough.bc.. else { $ss_interval = (intval($ss_interval) * 1000); }




So the code that you have is doing the same thing; checking the stats every [interval] and updating the display on the client.

I can't make a Joomla module without installing, configuring, and learning the quirks & glitches of Joomla. *_And... that ain't gonna happen in this century. :D_*

JW Player

User  
-1 rated :

George,

I've made this into a Joomla Module. If you'd like a copy of it, let me know. You can email me at:

admin@metaltome.com

JW Player

User  
-1 rated :

How would we go about applying JW Player skins to this code?

Also, anyone have any ideas on how to pull Album Art Covers into the Player? That would be the most awesome thing everrrrr.

JW Player

User  
-1 rated :

can you make me one I can put on my server http://67.159.44.161:8204/ website http://www.harleyradio.com/main/index.php email harleyradio@ymail.com

JW Player

User  
-1 rated :

I've completed the Joomla module for this. It comes with a Readme.txt on how to connect it to your Shoutcast Server. If you would like a copy, please email me at:

chris@metaltome.com

You can see the module in action at:

http://www.metaltome.com/radio-panel

JW Player

User  
-1 rated :

i have no clue how to upload the shoutcast_class.php and all those scripts to my server...

anyone want to explain that?

thank you SO much

JW Player

User  
-1 rated :

See the post on Nov. 10, 2008

JW Player

User  
-1 rated :

it says to upload the file to the server. where do i put it in the server? im kinda of new to webhosting and such...

JW Player

User  
-1 rated :

Make a directory structure like this:bc.. http://www.mydomain.com/player/
http://www.mydomain.com/images/
http://www.mydomain.com/media/
http://www.mydomain.com/scripts/



Put the player components, player.swf, swfobject.js, skin(s).swf in the player directory.

Put the media files, video.flv, music.mp3, in the media directory.

Put the script in the script directory.

Put your images in the image directory.

www.mydomain.com is a generic name for your domain.

video.flv and music.mp3 are generic names for your video and music files.

JW Player

User  
-1 rated :

Ajax and PHP script it's not a good solution when you have online 500 listeners and use JWPlayer player and this script. The server become overused, each listener = Apache load, and when title and artist it's reload at 500 listeners, mean 500 calls on apache server. This is the reason why i'm looking for Flash solution to display Artist and Title, also i post another ticket regarding this problem, a solution can be small modification on RTMPmodel.as, i got a part from Wowza SHOUTcast Player (witch is free open source player) and what do that:

On Wowza forum i got this details:

bc.. Metadata on JW Player for streaming is handled in the com.jeroenwijering.models.RTMPModel file.

Look at the onData Function.

Code:

public function onData(dat:Object):void {
//if(dat.type == 'metadata' && !metadata) {
if(dat.type == 'metadata') {
....

Put a break or some trace statements here and you should see the shoutCast metadata.

Richard


Maybe somebody will do something in this way, personal i paid JWPlayer, i'm not using free version and i really don't understand why people from here, guys who develop JWPlayer are not interested to add this feature in this player. If was only a static player for Video and Audio files on demand i understand, but also have support for live streaming contect... so ....

JW Player

User  
-1 rated :

500 AJAX requests in 30 seconds?

Why, that wouldn't even wake up the FastCGI server because they are all static requests.

Maybe 10,000 requests per second would be a bit of traffic.

Each AJAX request is only 98 bytes.

That's 0.098MB per minute. Nothing compared to the Shoutcast stream or a video stream.

JW Player

User  
-1 rated :

lefTy,

It's not abut traffic, that it's zero, it's about how many resources eat when you have 500 listeners, each listener with that script mean a apache process on server. Belive me, i try and i know what i mean, it's great script, but when you have less listeners on that player.

JW Player

User  
-1 rated :

Why are you using Apache for the AJAX requests?

499 of the 500 should be static requests for 98 bytes of data.

JW Player

User  
-1 rated :

Thanks lefTy for your replays, but we are going in Loop.

From Nov. 09, 2008 when i open this topic, i wait to see if somebody is able to do something on this player to get automated title and artist frm SHOUTcast streaming server, it's nothing special, just this features add, as have subtitle option and others, but maybe developers are not interested in this, he know better that me the code of this player.
Anything i try i don't get a answer on my questions just additional tricks. i'm ready to pay if someone is able to do this, i don't ask for free, as i paid licence for this player, i want to use at what i need, to play streaming from shoutcast and also if is possible to display that stupid Title and Artist, nothing impossible.

JW Player

User  
-1 rated :

But I like going round & round & round in circles it's fun! :D

I think you are misusing your server, but that's your problem, not mine.

If it's a Flash programmer that you are looking for, you are posting in the wrong place.

Try one of the Flash sites or maybe Jimb, who seems to be a capable Flash programmer, could be persuaded to do the Title/Artist thingy for you. His contact information is in this thread: *http://www.longtailvideo.com/support/forum/General-Chat/16621/A-few-simple-player-modifications#msg113046*

JW Player

User  
-1 rated :

Hello,

After long time of research, i found one solution, is not complete but working.
The solution is to use *"metaviewer"* is you take the stream from SHOUTcast Server in Wowza, display song title and URL, but nothing more.

Now the question is, why doesn't support if you play in JW Player direct from SHOUTcast server? Can be this plugin modify to display that info also from SHUTcast direct not only if you Flash server??

Here is the *metaviewer* source:
http://developer.longtailvideo.com/trac/browser/plugins/metaviewer

JW Player

User  
-1 rated :

Yes!!!

JWPLAYER + METAVIEWVER (PLUGIN) need to works direct from SHOUTcast server!

Why it doesn't display title direct from shoutcast server?.. it only works through of wowza media server :S

Maybe some modificatios in metaviewer plugin make this works? :D I Hope!!!!

Cheers.

JW Player

User  
-1 rated :

Anyone interested in using JW Player Flash Shoutcast Player for Joomla. I have made this into an installable Joomla 1.5 Module. Download below and read the enclosed Readme.txt:

http://www.metaltome.com/downloads/mod_FlashShoutPlayer.zip

Enjoy!

JW Player

User  
-1 rated :

I can't seem to get this to work. I've spent hours going over different ways of compiling it all and I think I'm close.

The songs play perfectly, and the title is trying to populate inside the player, but I literally get the title for each song being the letter "i" or "e" or "n" depending on which data_array number I select ( $data_array[5] ) in the shoutcast_song_title.php, *whether it's actually streaming or not...*

So, to recap: When I pull up http://mysite.com/pathto/shoutcast_song_title.php I get this:

bc.. document.getElementById("title").innerHTML = "Radio Station:: o
Status:: c
Artist/Song Name:: i";


Any idea what could be causing this? Thank you in advance for any help!

*
shoutcast.html*
bc.. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

<title>Display Shoutcast Song Title</title>

<style type="text/css">
div.playercontainer
{
position: absolute;
top: 100px;
left: 100px;
width: 400px;
height: 40px;
z-index: 0;
}

div.title
{
position: absolute;
top: 102px;
left: 105px;
width: 400px;
height: 18px;
font-size: 20px;
font-family: arial;
color: #FFFFFF;
z-index: 1;
}
</style>

<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

<script type="text/javascript">
function loadJsFile(filename)
{
gid('title').innerHTML = 'Retrieving Title...';
var fileref = document.createElement('script');
fileref.setAttribute('type', 'text/javascript');
fileref.setAttribute('src', filename);

if (typeof fileref != 'undefined')
{
document.getElementsByTagName('head')[0].appendChild(fileref);
}
};

setInterval("loadJsFile('shoutcast_song_title.php?' + (Math.round(1000 * Math.random())))", 30000);


function gid(element)
{
return document.getElementById(element);
};
</script>

<script type="text/javascript">
var flashvars =
{
file: encodeURIComponent('http://208.90.177.154:8000/;stream.nsv'),
type: 'sound',
frontcolor: '333333', // text & icons (green)
backcolor: '010101', // playlist background (blue)
lightcolor: 'CCCCCC', // selected text/track highlight (pink)
screencolor: '000000', // screen background (black)
autostart: 'true'
};

var params =
{
allowfullscreen: 'false',
allowscriptaccess: 'always',
wmode: 'opaque',
bgcolor: '#000000'
};

var attributes =
{
id: 'playerId',
name: 'playerId'
};

swfobject.embedSWF('player-4.2.90.swf', 'player', '400', '100', '9.0.124', false, flashvars, params, attributes);
</script>

<script type="text/javascript">
var player = null;
var loadJs = true;


function playerReady(obj)
{
player = gid(obj.id);
player.addModelListener('STATE', 'stateMonitor');
};


function stateMonitor(obj)
{
if((obj.newstate = 'PLAYING') && (loadJs == true))
{
loadJsFile('shoutcast_song_title.php?' + (Math.round(1000 * Math.random())));
loadJs = false;
}
};
</script>
<!--
<script type="text/javascript">
var loadJs = true;


function getUpdate(typ, pr1, pr2, pid)
{
if((typ == 'time') && (pr1 > 0) && (loadJs == true))
{
loadJsFile('shoutcast_song_title.php?' + (Math.round(1000 * Math.random())));
loadJs = false;
}
};
</script>

<script type="text/javascript">
var flashvars =
{
file: encodeURIComponent('http://broadband.eve-radio.com:8000/;stream.nsv'),
type: 'mp3',
width: '400',
height: '40',
frontcolor: '0x86C29D', // text & icons (green)
backcolor: '0x849BC1', // playlist background (blue)
lightcolor: '0xC286BA', // selected text/track highlight (pink)
screencolor: '0x000000', // screen background (black)
enablejs: 'true',
autostart: 'true'
};

var params =
{
allowfullscreen: 'false',
allowscriptaccess: 'always',
wmode: 'opaque',
bgcolor: '#000000'
};

var attributes =
{
id: 'playerId',
name: 'playerId'
};

swfobject.embedSWF('mediaplayer-3.16.swf', 'player', '400', '40', '7', false, flashvars, params, attributes);
</script>
-->
</head>

<body>

<div id="title" class="title">
Title
</div>
<div id="playercontainer" class="playercontainer">
<a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a>
</div>

</body>

</html>




*shoutcast_song_title.php*

bc.. <?php

require_once('shoutcast_class.php');

$display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");

$radio = new Radio("208.90.177.154:8000");

$data_array = $radio->getServerInfo($display_array);

//print "<pre>"; print_r($data_array); exit;

print "document.getElementById('title').innerHTML = '$data_array[12]';";

?>



*shoutcast_class.php*

bc.. <?php
/******
* You may use and/or modify this script as long as you:
* 1. Keep my name & webpage mentioned
* 2. Don't use it for commercial purposes
*
* If you want to use this script without complying to the rules above, please contact me first at: marty@excudo.net
*
* Author: Martijn Korse
* Website: http://devshed.excudo.net
*
* Date: 08-05-2006
***/

/**
* version 2.1
*/
class Radio
{
var $fields = array();
var $fieldsDefaults = array("Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");
var $very_first_str;
var $domain, $port, $path;
var $errno, $errstr;
var $trackLists = array();
var $isShoutcast;
var $nonShoutcastData = array(
"Server Status" => "n/a",
"Stream Status" => "n/a",
"Listener Peak" => "n/a",
"Average Listen Time" => "n/a",
"Stream Title" => "n/a",
"Content Type" => "n/a",
"Stream Genre" => "n/a",
"Stream URL" => "n/a",
"Stream AIM" => "n/a",
"Stream IRC" => "n/a",
"Current Song" => "n/a"
);
var $altServer = False;
var $inputEncoding, $outputEncoding, $streamEncoding;

function Radio($url)
{
$parsed_url = parse_url($url);
$this->domain = isset($parsed_url['host']) ? $parsed_url['host'] : "";
$this->port = !isset($parsed_url['port']) || empty($parsed_url['port']) ? "80" : $parsed_url['port'];
$this->path = empty($parsed_url['path']) ? "/" : $parsed_url['path'];

if (empty($this->domain))
{
$this->domain = $this->path;
$this->path = "";
}

$this->setOffset("Current Stream Information");
$this->setFields(); // setting default fields

$this->setTableStart("<table border=0 cellpadding=2 cellspacing=2>");
$this->setTableEnd("</table>");
}

function setFields($array=False)
{
if (!$array)
$this->fields = $this->fieldsDefaults;
else
$this->fields = $array;
}
function setOffset($string)
{
$this->very_first_str = $string;
}
function setTableStart($string)
{
$this->tableStart = $string;
}
function setTableEnd($string)
{
$this->tableEnd = $string;
}

function setOutputEncoding($charset)
{
$this->outputEncoding = $charset;
}
function setInputEncoding($charset)
{
$this->inputEncoding = $charset;
}
function setStreamEncoding($charset)
{
$this->streamEncoding = $charset;
}

function getHTML($page=False)
{
if (!$page)
$page = $this->path;
$contents = "";
$domain = (substr($this->domain, 0, 7) == "http://") ? substr($this->domain, 7) : $this->domain;


if (@$fp = fsockopen($domain, $this->port, $this->errno, $this->errstr, 2))
{
fputs($fp, "GET ".$page." HTTP/1.1\r\n".
"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\r\n".
"Accept: */*\r\n".
"Host: ".$domain."\r\n\r\n");

$c = 0;
while (!feof($fp) && $c <= 20)
{
$contents .= fgets($fp, 4096);
$c++;
}

fclose ($fp);

$this->encodeContent($contents);

preg_match("/(Content-Type:)(.*)/i", $contents, $matches);
if (count($matches) > 0)
{
$contentType = trim($matches[2]);

preg_match("/(meta http-equiv=\"Content-Type\" content=\"(.*); charset=(.*)\")/iU", $contents, $matches);
if (isset($matches[3]))
{
$this->setStreamEncoding($matches[3]);
}
if ($contentType == "text/html")
{
$this->isShoutcast = True;
return $contents;
}
else
{
$this->isShoutcast = False;

$htmlContent = substr($contents, 0, strpos($contents, "

JW Player

User  
0 rated :


Enable the debugging print statement in *shoutcast_song_title.php* by removing the double forward slashes and use a valid mount point.bc.. <?php

require_once('shoutcast_class.php');

$display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");

*$radio = new Radio("207.200.96.230:8014");*
//$radio = new Radio("208.90.177.154:8000");

$data_array = $radio->getServerInfo($display_array);

*print "<pre>"; print_r($data_array); exit;*

print 'document.getElementById("title").innerHTML = "' . $data_array[12] . '";';

?>



Call the script from your browser:bc.. http://www.domain.com/path/shoutcast_song_title.php



You should get the array of available data from the mount point that looks like this:bc.. Array
(
[0]=>BootLiquor:AmericanarootsmusicforCowhands,CowpokesandCowtippers.[SomaFM]
[1]=>AltCountryAmericana
[2]=>http://www.somafm.com
[3]=>ArthurGodfrey-HelloInThere
[4]=>Serveriscurrentlyupandpublic.
[5]=>Streamisupat128kbpswith152of300listeners(150unique)
[6]=>300
[7]=>19h37m34s
[8]=>BootLiquor:AmericanarootsmusicforCowhands,CowpokesandCowtippers.[SomaFM]
[9]=>audio/mpeg
[10]=>AltCountryAmericana
[11]=>http://www.somafm.com
[12]=>ArthurGodfrey-HelloInThere
)



It's the same page of data that you get if you go to the mount point with your browser:bc.. http://207.200.96.230:8014/



JW Player

User  
0 rated :

Thank you so much for your fast reply, I really appreciate it. Okay so I think we might be seeing part of the problem here. When I call that page directly (while streaming) I get this: Connection timed out (110)

here is my shoutcast_song_title.php page:

bc.. <?php

require_once('shoutcast_class.php');

$display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Server Status", "Stream Status", "Listener Peak", "Average Listen Time", "Stream Title", "Content Type", "Stream Genre", "Stream URL", "Current Song");

$radio = new Radio("207.200.96.230:8014");
//$radio = new Radio("208.90.177.154:8000");

$data_array = $radio->getServerInfo($display_array);

print "<pre>"; print_r($data_array); exit;

print 'document.getElementById("title").innerHTML = "' . $data_array[12] . '";';

?>


http://208.90.177.154:8000/ pulls up info though.

JW Player

User  
0 rated :


I dunno seems to work fine for me.

*http://willswonders.myip.org:8074/Shoutcast Song Title.html*

JW Player

User  
0 rated :

How is it able to pull up with the address you gave me, but when I pull up my address:
*
http://jennyandjeramiah.com/liveradio/test/shoutcast.html*

The title never shows, but streaming is fine and when I pull up yours:

* http://willswonders.myip.org:8074/Shoutcast Song Title.html*

both seem to work fine?

I think my code is wrong...can i get a zip file of all your code? (begging please) I really think that it's a code issue at this point. Your thoughts?

JW Player

User  
0 rated :

Thank you so much, Hobbs. I'm going to give this a go and I'll report back the results. Very much appreciated!!!

JW Player

User  
0 rated :

Okay well I have implemented your code including your version of the player.swf and I'm running into the same problems.

We've eliminated the code being a problem, and my winamp, and we've eliminated my server being the problem *I think* (because *you* can pull in the correct title and song from my stream). Wow I can't believe it but I'm actually confused as how to troubleshoot further LOL

So I thought about mounting your IP address essentially like you did with my radio and you were able to pull in my song title and song. However, when I do that with your IP address and port, your song streams but the title doesn't show up. It's still putting an "i" in place of the title.

Could it be my computer? I've even changed the port to 8014 and it's not working. I think the whole connection timed out could help elude to the root of the problem. Have you had any experience with that type of error in this situation?

What's weird is it's putting out the song information and history here --> *http://208.90.177.154:8014/index.html* so why is my script not able to pull that information that's obviously being generated?

JW Player

User  
0 rated :


I've tried your stream on several remote comuters and it always works fine.

If you're running the server on the same computer, the problems are probably just from doing a local loopback.

Try your player on another computer.

JW Player

User  
0 rated :

It seems to me that only when we visit it on your server then it works. Because if you were to visit this address: *http://jennyandjeramiah.com/liveradio/beta/Shoutcast%20Song%20Title.html* then the title doesn't show up, and I think if you visited that address you would confirm that. It's just weird. Also if you visited: *http://jennyandjeramiah.com/liveradio/beta/shoutcast_song_title.php* that you would also see: *document.getElementById("title").innerHTML = "i";*

Can you confirm that? So I am starting to think that perhaps it is a server issue?

JW Player

User  
0 rated :


Yeah, all I see is the "i".

What version of PHP are you using?

Since most of the work is done in *shoutcast_class.php*, you will have to work your way through it until you find the point of failure.

JW Player

User  
0 rated :

PHP version 4.4.9. I loaded it on another server PHP version 5.2.9 and it's still doing the same thing! LOL

JW Player

User  
0 rated :

hmm, I'm done trying to figure this out. Since I've tested it on two separate servers independent of each other running different versions of php, I have to conclude it's a scripting issue at this point.

Thank you for all your help though!

JW Player

User  
0 rated :

*IF *your experiencing the same issue I am, or looking for an *even better way* to bring in the info independent of the player, check out this awesome script which is affordable at 15 bucks which is a WINAMP plugin and will publish your song title and ALBUM ART with your song you're currently streaming on shoutcast to your website. Then just add the player below it!

I think this is the better way to do it!

*http://brandon.fuller.name/archives/hacks/nowplaying/winamp/*

JW Player

User  
0 rated :

my problem is the next.

When I try to open the file directly "shoutcast_song_title.php" sends me this error message "Connection timed out (110)" the player works perfectly but does not display the title information or anything, so try to open it and gave me this error, you can be?

follow the example set by George 29 jan 2009

JW Player

User  
0 rated :


@Edgar,

Your hosting service must allow external file access to use this script.

Some hosts don't alow external file access for security reasons.

Check with your hosting service to see if they allow external file access.

JW Player

User  
0 rated :

Thanks for your response hobbs, I will ask my shoutcast service provider to verify what you say ...

JW Player

User  
0 rated :

Actually it had to do with opening a port on the server I believe that's how it fixed my problem.

JW Player

User  
0 rated :

How can I adapt this for a simple Icecast feed? I changed the URL's to /;live and got swfobject 2.2 and changed that in the script. But all I get is a black box that says Title and nothing.

It is so easy to update the title using PHP but it seems to take a 1000 lines of code to pull it out :)

JW Player

User  
0 rated :

Here you go for shoutcast. Its not 1000 lines ;)

bc.. <?php


function streaminfo($file,$port) { global $src;
$fp = @fsockopen ($file, $port, &$errno, &$errstr, 5);
if (!$fp) {
echo "Could not connect to *{$file}:{$port}* ({$errno}) - {$errstr}\n";
} else {
fputs ($fp, "GET /7 HTTP/1.1\r\nUser-Agent:Mozilla\r\n\r\n");
while (!feof($fp)) {
$stream = fgets($fp,1024);
}
list(,$stream) = explode("<body>",$stream);
list($stream) = explode("</body>",$stream);
list($user, $status, $user_peak, $user_max,$filler ,$bitrate, $song) = explode(",",$stream);
echo "<center>";


if($status== 0 ) {
echo"<IMG src=offline.gif><br>";
} else {
echo"<IMG src=online.gif><br>";
echo "<p align = center>";

echo $user.": user count<br>";
echo $user_peak.": peak<br>";
echo $user_max.": max<br>";
echo $bitrate.": bitrate<br>";
echo $song.": song<br>";

}



fclose($fp);
}
}

streaminfo("127.0.0.1",8000);


?>


JW Player

User  
0 rated :

I'd love to see this updated with instructions on getting a Shoutcast stream to function with JW Player 5.

JW Player

User  
0 rated :

The song title retrival works for my localhost perfectly! but when i upload them in the web server I always get only an "i" printed???

When i removed the comments on the "print "<pre>"; print_r($data_array); exit;" line I got "Connection timed out (110)" but even this works fine in my localhost!!!

Puzzeled! Please help! I'm new to it!

JW Player

User  
0 rated :


Your host probably doesn't allow external file access for security reasons (most don't).

Check with your host.

JW Player

User  
0 rated :

Yes It is indeed.....!!! Web host was blocking it! Thanks for pointing it out.

JW Player

User  
0 rated :

For 7.html:bc.. <?php

$host="my.domain.com";//iporurlofshoutcastserver
$port="8000";//portofshoutcastserver

$fp=@fsockopen("$host",$port,$errno,$errstr,30);

if($fp)
{
fputs($fp,"GET/7.htmlHTTP/1.0\r\nUser-Agent:GETSEVEN(MozillaCompatible)\r\n\r\n");

while(!feof($fp))
{
$data.=fgets($fp,1000);
}

fclose($fp);

$data=ereg_replace(".*<body>","",$data);
$data=ereg_replace("</body>.*",",",$data);
$data_array=explode(",",$data);
$listeners=$data_array[0];
$status=$data_array[1];
$peak_listeners=$data_array[2];
$maximum_listeners=$data_array[3];
$unique_listeners=$data_array[4];
$bitrate=$data_array[5];
$track=$data_array[6];
}

$title=chop($track);
$select=explode("-",$title);
$artist=chop($select[0]);
$title=chop($select[1]);

if($status==1)
{
//...artistandtitle
print'document.getElementById("title").innerHTML="'.$data_array[6].'";';

//...titleonly
//print'document.getElementById("title").innerHTML="'.$title.'";';
}
else
{
print'document.getElementById("title").innerHTML="Offline";';
}

?>



JW Player

User  
0 rated :

http://willswonders.myip.org:8085/php/Shoutcast%20Song%20Title.html

nice cant see anything :) And cant get script working ....

Can any body upload the complete working script en swf and more to: http://www.sendspace.com/

thanks..

JW Player

User  
0 rated :


Sure enough.

*http://willswonders.myip.org:8074/Shoutcast Song Title.zip*

Let me know if there is something else that you need.

JW Player

User  
0 rated :

Hi,

We running a wowza server and stream title is in the rtmp stream. We have many clients (radio stations) the want to see the artist and title (refresh autom.) on the rtmp stream on flash a player (JWplayer).
Nice scripts here but in wowza there is already the title info. Please check http://www.live-streams.nl/flash/ and see a flash example (title info refresh) i think a very nice extra for the JWplayer users and Wowza audio users! :-) I want to pay for it and give the simple .fla source to make it.

Best regards,
Michel

JW Player

User  
0 rated :

This post seems to be really useful, but I could not make it work.
I may have some problem with the url.
Currently I could not test it on a stream, could I test it on an existing .mp3? Where should I upload the .mp3 fie (in the same folder with the shoutcast_song_title.php, shoutcast_class.php, Shoutcast Song Title.html)? Which file should I open in the browser?shoutcast_song_title.php or Shoutcast Song Title.html?
When I tried to open the Shoutcast Song Title.html file in the browser I become the message 'Get the Adobe Flash Player to see this video.', although I have installed the latest version of Flash player. What Am I doing wrong?

JW Player

User  
0 rated :

Please post a link to your Test Page if you want someone to take a look at it...

JW Player

User  
0 rated :

http://209.51.184.250/Title%20and%20Singer/Shoutcast%20Song%20Title.html
Here is a link to my page.
Thanks in advance.

JW Player

User  
0 rated :

Your link to swfobject appears to be broken.
bc.. ../Hristina/New folder/swfobject-2.1.js


Anyway, it's better to load swfobject from google's CDN.
bc.. <script src="http://www.google.com/jsapi"></script>
<script>google.load('swfobject', '2.2');</script>

JW Player

User  
0 rated :

Dear tweedledum ,
Now it is not displayed the 'Get the Adobe Flash Player to see this video.' message in the browser. It is displayed just a text field with yellow foreground with 'Title' written in it.
I do not see any player.
I have written my plugins in as3, might should I do this in as3 too?
Thank you very much in advance.

JW Player

User  
0 rated :

Hi!
My plugin is from type Flash Plugin. And the stream is rtmp. Is there any possible way to display the title and the artist?
I have seen something above
bc.. /** Get metadata information from netstream class. **/
public function onData(dat:Object):void {
if(dat.type == 'metadata') {
if(dat.width) {
video.width = dat.width;
video.height = dat.height;
}
if(model.playlist[model.config['item']]['start'] > 0) {
seek(model.playlist[model.config['item']]['start']);
}
} else if(dat.type == 'complete') {
clearInterval(timeinterval);
model.sendEvent(ModelEvent.STATE,{newstate:ModelStates.COMPLETED});
} else if(dat.type == 'fcsubscribe') {
if(dat.code == "NetStream.Play.StreamNotFound" ) {
stop();
model.sendEvent(ModelEvent.ERROR,{message:"Subscription failed: "+model.playlist[model.config['item']]['file']});
}else if(dat.code == "NetStream.Play.Start") {
setStream();
}
clearInterval(timeout);
}
model.sendEvent(ModelEvent.META,dat);
};

But how can I use that in my case (to get title and artist)?
Please help me. I am fully stuck.
Thanks in advance

JW Player

User  
0 rated :

Does it work on the latest jwplayer and shoutcast v2?

Code might be outdated to support the latest versions.

Ethan Feldman

JW Player Support Agent  
0 rated :

We don’t support ShoutCast officially…

This question has received the maximum number of answers.