前端添加视频流rtmp格式

时间:2019-08-20
本文章向大家介绍前端添加视频流rtmp格式,主要包括前端添加视频流rtmp格式使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

要求:rtmp格式,

   在线直播

   url地址

效果:

代码:初次打开时间较长,

<!DOCTYPE html> 
<html> 
<head> 
<script type="text/javascript" src="flowplayer-3.2.8.min.js"></script> 
<title>FlowPlayer</title> 
</head> 
   
   
<body>     
    <!-- this A tag is where your Flowplayer will be placed. it can be anywhere --> 
    <a   
         href="#" 
         style="display:block;width:1040px;height:660px"   
         id="player">  
    </a>  
    <!-- this will install flowplayer inside previous A- tag. --> 
    <script> 
    var urls = "rtmp://202.69.69.180:443/webcast/bshdlive-pc";
    flowplayer("player", "flowplayer-3.2.18.swf",{  
        clip: {  
          url: urls,
          provider: 'rtmp', 
          live: true,  
        },   
        plugins: {   
           rtmp: {   
             url: 'flowplayer.rtmp-3.2.8.swf',   
             netConnectionUrl: urls
           }  
       }  
    }); 
    </script>  
</body> 
</html> 

需要引入的文件:点击下载

flowplayer.controls-3.2.16.swf

flowplayer.rtmp-3.2.8.swf

flowplayer-3.2.8.min.js

flowplayer-3.2.18.swf

rtmp视频直播公网测试地址:https://blog.csdn.net/qq_35366269/article/details/90475372

原文地址:https://www.cnblogs.com/zhaozhenghao/p/11381784.html