I am currently trying to get a radio stream from ShoutCast to play with JPlayer with no success.
Ideally I would like a pls file such as this one http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377246 to play with JPlayer.
Here is my current code:
<script type='text/javascript'>//<![CDATA[ $(function(){ $("#jquery_jplayer_1").jPlayer({ swfPath: "js/Jplayer.swf", ready: function () { $(this).jPlayer("setMedia", { mp3: "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377246" }); }, supplied: "mp3" }); });//]]> </script>
Not sure whether this is possible or not but I would appreciate any support.
Thanks
Advertisement
Answer
A .pls
file is a playlist, not any kind of actual stream. Open that file up with your favorite text editor to see the URL of the actual stream.
You will have to parse this file prior to playing the audio it links to.