前端添加视频流rtmp格式

要求:rtmp格式,

   在线直播

   url地址

效果:

前端添加视频流rtmp格式_第1张图片

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

DOCTYPE html> 
<html> 
<head> 
<script type="text/javascript" src="flowplayer-3.2.8.min.js">script> 
<title>FlowPlayertitle> 
head> 
   
   
<body>     
     
    <a   
         href="#" 
         style="display:block;width:1040px;height:660px"   
         id="player">  
    a>  
     
    <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> 

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

前端添加视频流rtmp格式_第2张图片

 

flowplayer.controls-3.2.16.swf

flowplayer.rtmp-3.2.8.swf

flowplayer-3.2.8.min.js

flowplayer-3.2.18.swf

或者直接从github下载:https://github.com/zhaozhenghao/videoRtmp.git

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

你可能感兴趣的:(前端添加视频流rtmp格式)