jPlayer和Shoutcast配置 [英] jPlayer and Shoutcast Configuration

查看:97
本文介绍了jPlayer和Shoutcast配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置JPlayer插件和Shoutcast。根据他们的网站,这是可能的。

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


如何让jPlayer播放SHOUTCast流?您需要将Media
设置为流URL。例如,SHOUTcast服务器:
http://mp3-vr-128.as34763.net/ MP3流网址:
http:// mp3-vr- 128.as34763.net/;stream/1

我试过这样做

<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){

    $("#jquery_jplayer_1").jPlayer({
        ready: function (event) {
            $(this).jPlayer("setMedia", {
                m4a:"http://77.68.106.224:8018;stream/1",
                oga:"http://77.68.106.224:8018"
            }).jPlayer("play");
        },


        swfPath: "js",
        supplied: "m4a, oga, mp3", 
        wmode: "window"
    });
});
//]]>
</script>

我的设置无法获得任何输出。是否有人使用JPlayer进行shoutcast Stream,或者任何人都可以建议不需要php的播放器。

I do not get any output with my settings. Is anyone using JPlayer for a shoutcast Stream, or can anyone suggest a player that doesn't need php.

推荐答案

这个电视台的甜蜜氛围!

sweet vibes on this station!

你差不多了在那里,请参阅这个小提琴,看看您的流在jPlayer中工作.. Shoutcast输出MP3格式的音频,而不是M4a或OGG ..你需要更像下面的构造函数代码..

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..

要知道的一件重要事情是,使用IE8时的Flash插件有时花费分钟缓冲音频..你点击播放,认为它不工作然后突然发现你的音频在三分钟后开始播放..好消息是Chrome,Safari和Firefox几乎立即播放流。

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>

这篇关于jPlayer和Shoutcast配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆