将Stream嵌入网站

时间:2014-07-16 10:49:13

标签: embed jwplayer rtmp flowplayer

美好的一天,我有这些流http://xxx.xxx.xxx.xxx:9987/udp/239.100.0.105:1234我可以通过VLC和Sm播放器播放。我可以通过JWPlayer或Flow播放器之类的URL将这些流嵌入到网站上吗?

1 个答案:

答案 0 :(得分:1)

您可以使用JWPlayer。 将JW Player库添加到您的页面:

​<script src="//p.jwpcdn.com/6/9/jwplayer.js" ></script>

脚本

<div id=myElement></div>
<script>
        jwplayer("myElement").setup({
            file: "http://xxx.xxx.xxx.xxx:9987/udp/239.100.0.105:1234",
            image: "myVideo.jpg", //only if you have image
            height: 360,
            width: 640
        });
</script>

Flash中的HLS仅在JW6 Premium和广告版本中受支持,因此如果您的信息流是HLS,那么您将购买许可证(rtmp在免费版中使用)

如果您正在寻找支持HLS的免费播放器,可以使用此插件Video-JShttps://github.com/videojs/videojs-contrib-hls

exapmle:http://ecmendenhall.github.io/hls-aac.html

编辑1:

<div id=myElement></div>
<script>
        jwplayer("myElement").setup({
            file: "http://xxx.xxx.xxx.xxx:9987/udp/239.100.0.105:1234",
            image: "myVideo.jpg", //only if you have image
            height: 360,
            width: 640,
            primary:;flash',
            type:'hls'
        });
</script>
相关问题