从Flowplayer更改为Jwplayer - 无法连接到服务器

时间:2014-11-09 18:49:35

标签: stream live jwplayer rtmp

我正在尝试从flowplayer切换(下面的当前代码)

flowplayer(“播放器”,“http://churchwebsite.com/flowplayer-3.1.5.swf”,{

    clip: { 
        url: 'livestream',
        live: 'true', 
        provider: 'influxis' 
    },  
    // streaming plugins are configured under the plugins node 
    plugins: {  
        influxis: { 
            url: 'http://churchwebsite.com/flowplayer.rtmp-3.1.3.swf', 

            netConnectionUrl:
                'rtmp://stream.s22.cpanelservices.com/somethinglive'

这就是我要转换的内容

jwplayer("myElement").setup({
file: "rtmp://stream.s22.cpanelservices.com/somethinglive",
autostart: true,
controls: true,
height: 600,
width: 800,

这是我的信息,不知道放在哪里。

RTMP://stream.s22.cpanelservices.com/somethinglive

RTMP://churchwebsite.com/live

我正在使用Adobe Flash媒体编码器进行流式传输,并通过它显示

FMS网址:rtmp://stream.s22.cpanelservices.com/somethinglive

Stream:livestream

1 个答案:

答案 0 :(得分:1)

RTMP流媒体的一个简单示例:

<head>部分:

<script type="text/javascript" src="jwplayer.js"</script>

<body>部分:

<div id="#myElement">Loading the player...</div>
<script>
jwplayer("myElement").setup({
    file: "rtmp://example.com/application/mp4:myVideo.mp4",
    image: "/assets/myVideo.jpg",
    height: 360,
    width: 640
});
</script>

这假设三个JW Player脚本文件( jwplayer.js.jwplayer.html5.js和jwplayer.flash.swf )与index.html位于同一目录中。否则,您的 src 属性需要指向您实际隐藏它们的位置。无论如何,所有这三个文件都需要在一起。

流的文件属性取决于您提供的内容。请参阅JW播放器配置指南:http://support.jwplayer.com/customer/portal/articles/1430358-using-rtmp-streaming