如何在流媒体播放rtmp url直播

时间:2012-01-25 12:20:50

标签: streaming video-streaming flowplayer rtmp live-streaming

使用此代码..第一次播放rtmp live streaimg。但现在,此播放器仅加载。无播放

flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
    clip: {  
        url: 'livestream',
        provider: 'rtmp',
        live: true
    },
    plugins: {
        // RTMP streaming plugin
        rtmp: {
            url: 'flowplayer.rtmp-3.2.3.swf',
            netConnectionUrl: 'rtmp://domain.com/hiox'
        }
    }
});

请帮帮我

3 个答案:

答案 0 :(得分:1)

我有同样的问题,根据Edgecast文档,你应该使用订阅参数:

flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
    clip: {  
        url: 'livestream',
        provider: 'rtmp',
        live: true
    },
    plugins: {
        rtmp: {
            url: 'flowplayer.rtmp-3.2.3.swf',
            netConnectionUrl: 'rtmp://domain.com/hiox',
            subscribe: true
        }
    }
});

答案 1 :(得分:0)

阅读RTMP docs

我过去曾成功使用过flowplayer进行直播。我的配置和你的配置之间的区别是我在我的rtmp部分中有“subscribe:true”。这是EdgeCast作为我的rtmp服务器,但其他提供商也期望它。

答案 2 :(得分:0)

我认为您的网址有误,因此请检查您的流服务器,在我的情况下为red5。 如今android和ios不支持Flash。因此,请改用HLS或Dash。

<!doctype html>
<html>
<head>    
    <title>Basic RTMP with red5 : Flowplayer</title>

    </head>

<body>

<div id="wowza" style="width:644px;height:276px;margin:0 auto;text-align:center; background-color: red;">
</div>
 <script src="http://releases.flowplayer.org/js/flowplayer-3.2.13.min.js"></script>
<script>
$f("wowza", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {

    clip: {
        //here the url is the link on which streaming is on
        url: 'rtmp://000.00.208.207/live/141769?key=141769',
        scaling: 'fit',
        provider: 'red5'
    },

    plugins: { 
        red5: {
        // here red5 is the streaming server, change if your server name is other
            url: "flowplayer.rtmp-3.2.13.swf",
             // netConnectionUrl defines where the streams are found
            netConnectionUrl: 'rtmp://000.00.208.207/live/'
        }
    },
});
</script>
</body>
</html>
相关问题