前端添加视频流rtmp格式

心已入冬 提交于 2019-11-28 00:05:49

要求: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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!