jPlayer and Shoutcast Configuration

后端 未结 2 1432
终归单人心
终归单人心 2020-12-30 15:59

I am trying to set up JPlayer plugin and Shoutcast. According to their website this is possible to do.

How do I get jPlayer to play a SHOUTCast strea

相关标签:
2条回答
  • 2020-12-30 16:45

    sweet vibes on this station!

    You're almost there, see this fiddle to see your stream working in jPlayer.. Shoutcast outputs audio in MP3 format, not M4a or OGG.. you need constructor code more like that below..

    One important thing to know is that the Flash plugin when using IE8 sometimes spends minutes buffering the audio.. You click play, think it isn't working then suddenly find your audio starts playing after three minutes.. The good news is that Chrome, Safari and Firefox play the stream almost immediately.

    <script type="text/javascript">
    //<![CDATA[
    $(document).ready(function(){
    
        $("#jquery_jplayer_1").jPlayer({
            ready: function (event) {
                $(this).jPlayer("setMedia", {
                    mp3:"http://77.68.106.224:8018;stream/1"
                }).jPlayer("play");
            },
    
    
            swfPath: "js",
            supplied: "mp3", 
            wmode: "window"
        });
    });
    //]]>
    </script>
    
    0 讨论(0)
  • 2020-12-30 16:45

    Don't know if you still need a solution. We used the j player in the past but with Chrome updates and problems with flash and other browsers, Win 10 and flash issues we moved away from it. DO NOT CHANGE ANY PUNCUATIONS. Just paste the code into your website.

    We now use a simple media player code. You'll have to put in your IP and Port #.

         <div id="wb_MediaPlayer1">
    <audio src="http://YOUR IP ADDRESS:YOUR PORT/;" id="MediaPlayer1" autoplay="autoplay" controls="controls">
    </audio></div>
    

    This code is included in our Widgets service at My Radio Hosting if you would like to take a look.

    Hope this helps!

    0 讨论(0)
提交回复
热议问题