如何在flowplayer中播放rtmp url直播

发布于 2024-12-28 21:09:51 字数 432 浏览 0 评论 0原文

使用此代码..第一次是播放 rtmp 直播流。但现在,仅加载此播放器。无法播放

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'
        }
    }
});

请帮助我

Use this code..first time it is play rtmp live streaimg.but now,This Player is loaded only.No play

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'
        }
    }
});

Please help me

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

喜爱皱眉﹌ 2025-01-04 21:09:51

我认为你的 URL 是错误的,请检查你的流媒体服务器,在我的例子中它是 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>

I think your URL is wrong as well as check out your streaming server, In my case it is red5.
Nowadays android and ios not supporting flash. So use HLS or Dash instead.

<!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>
人海汹涌 2025-01-04 21:09:51

我遇到了同样的问题,根据 Edgecast 文档,您应该使用 subscribe 参数:

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
        }
    }
});

编辑:修复了拼写错误。

I had the same issue, according to the Edgecast documentation you should use the subscribe parameter:

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
        }
    }
});

EDIT: Fixed typo.

空袭的梦i 2025-01-04 21:09:51

阅读 RTMP 文档

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

Have a read of the RTMP docs.

I have used flowplayer successfully for live streaming in the past. The difference between my config and yours is I have "subscribe: true" in my rtmp section. This was with EdgeCast as my rtmp server but other providers expect it as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文