Search code examples
javascriptaudio-streamingjplayershoutcastinternet-radio

Shoutcast URL does not stream on JPlayer, but does on another flash player?


I'm trying to stream http://gwradio.serverroom.us:4142/;stream.mp3 using JPlayer, but nothing happens when I try to play the stream.

Here's a test of the JPlayer code that has been confirmed to play other streams

var stream = {
    title: "WRGW TEST",
    mp3: "http://gwradio.serverroom.us:4142/;stream.mp3"
},
ready = false;

$("#jquery_jplayer_1").jPlayer({
    ready: function (event) {
        ready = true;
        $(this).jPlayer("setMedia", stream);
    },
    pause: function() {
        $(this).jPlayer("clearMedia");
    },
    error: function(event) {
        if(ready && event.jPlayer.error.type === $.jPlayer.error.URL_NOT_SET) {
            // Setup the media stream again and play it.
            $(this).jPlayer("setMedia", stream).jPlayer("play");
        }
    },
    swfPath: "../dist/jplayer",
    supplied: "mp3",
    preload: "none",
    wmode: "window",
    useStateClassSkin: true,
    autoBlur: false,
    keyEnabled: true
});


$("#jplayer_inspector").jPlayerInspector({jPlayer:$("#jquery_jplayer_1")});

Here is the same URL working with another flash player: http://www.ep.gwradio.com/

Where's the beef? Can anyone help me out with this?


Solution

  • Resolved - the issue was the server version of Shoutcast being used. Updating the server version fixed the problem.