0

I have a very specific problem with jPlayer. I need to run it in Android/iPhone, which is no problem thanks to "jPlayer Android Fix" on the documentation. However, I also need it to stream a ShoutCast .MP3 file, not a ShoutCast stream. All the documentation I read points to a generic URL/IP/Port, but not a file.

I have got it all working with a static MP3 using the following code:

<script type="text/javascript">
//<![CDATA[

$(document).ready(function() {
  var id = "#jquery_jplayer_1";

  var bubble = {
    mp3:"http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3"
  };

  var options = {
    swfPath: "/jplayer2-4-0",
    supplied: "mp3",
    wmode: "window",
    smoothPlayBar: true,
    keyEnabled: true
  };

  var myAndroidFix = new jPlayerAndroidFix(id, bubble, options);

  $('#setMedia-Bubble').click(function() {
    myAndroidFix.setMedia(bubble);
    $('.jp-title ul li').text('Bubble');
  });
  $('#setMedia-Bubble-play').click(function() {
    myAndroidFix.setMedia(bubble).play();
    $('.jp-title ul li').text('Bubble');
  });

  $("#jplayer_inspector").jPlayerInspector({jPlayer:$("#jquery_jplayer_1")});
});
//]]>
</script>

... but the moment I change mp3:"http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3"

to mp3:"http://live.station.ca:8000/stream.mp3"

... I get nothing. I've even tried

mp3:"http://live.station.ca:8000/stream.mp3;stream/1"

Can anybody help? Thanks in advance!

user2961787
  • 41
  • 1
  • 8
  • There is no such thing as a "SHOUTcast MP3 file". SHOUTcast only sends streams. Now, it is common for a streaming server to make the resource look like an MP3 file by calling it `stream.mp3`, but that doesn't mean it's a file. In any case, it doesn't matter to the client. The browser doesn't know or care whether the original is from a file or a live stream. If you would post the link to the real station or a packet capture showing what's happening, we could help you. What you have there probably isn't a SHOUTcast server. – Brad Nov 07 '13 at 18:35
  • Thanks for the clarification. With your help, I was able to trace back to the configuration of the SHOUTcast stream and can definitely see that it's the problem, especially when I put the ABC Jazz feed http://listen.radionomy.com/abc-jazz/;stream/1 into my code and it worked fine. Much appreciated! – user2961787 Nov 08 '13 at 22:36

0 Answers0