JwPlayer无法播放rtmp流吗? [英] JwPlayer not playing rtmp stream?

查看:589
本文介绍了JwPlayer无法播放rtmp流吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在html中的脚本标签下设置了这样的Jwplayer:

i have setup Jwplayer like this in my html under the script tag:

<script type="text/javascript">

         jwplayer("container").setup({
            flashplayer: "js/jwplayer.flash.swf",
            file: "rtmp://localhost:1935/121/mystream.stream",
            height: 270,
            width: 506
             });

    </script>

但是它给了我一个错误,例如找不到可播放的源".但是,如果在在线jw播放器上检查我的实时流,则可以正常工作.如果我使用演示网址"http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4",那么我的播放器工作正常.我不知道这有什么问题.请帮助.

but it is giving me a error like "No playble source found". But if check my live stream on online jw player,its working fine. And if i use a demo url "http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4"then my player is working fine.I dont know what wrong in this.Please help.

推荐答案

您需要将播放器库放在头部,而播放器将代码嵌入体内.您可以完全删除flashplayer: "js/jwplayer.flash.swf",,因为JW Player js库将确定.swf文件是否必要并将其包含在内.

You need to put the player library in the head and the player embed code in the body. You can delete flashplayer: "js/jwplayer.flash.swf", altogether since the JW Player js library will determine whether the .swf file is necessary and include it under the hood.

有关基本视频嵌入的更多信息,包括此处的示例代码: https://support.jwplayer.com/customer/portal/articles/1406723

More info on basic video embeds, including sample code here: https://support.jwplayer.com/customer/portal/articles/1406723

这篇关于JwPlayer无法播放rtmp流吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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