帮助列表 |
html部分:
<video id="video的id" style="width:327px;height:224px" autoplay muted></video>
autoplay 自动播放
muted 静音
<script type="text/javascript" src="https://cdn.aodianyun.com/vis/jquery-1.7.2.min.js"></script> <script src="https://cdn.aodianyun.com/vis/BandwidthHandler.js"></script> <script src="https://cdn.aodianyun.com/vis/lcpsplayer.js"></script> <script src="https://cdn.aodianyun.com/vis/lcpspush.js"></script> |
2、初始化
var lcpsPush = new LcpsPush({ videoObj:document.getElementById('video的id'), addr: urlPara.addr//推流地址 采用wss格式 rtcStream: urlPara.stream || '20171221140117.2158.lcps.aodianyun.com.1',
}); |
lcpsPush.pushStream(); |
lcpsPush.stopStream(); |
lcpsPush.changeCamera({ audioIndex:0,//音频设备 int 默认0 videoIndex:0,//视屏设备 int 默认0 videoState:true,//是否使用视屏 boolen 默认 true audioState:true,//是否使用音频 boolen 默认 true callback:function(){ }//回调函数 }) |
LcpsWebrtcPlay("video的id", addr, rtcStream, OnError); 参数说明 addr 推拉流地址 有后台提供 参照控制台路由addr rtcStream mcu流 格式一般为"mcu0" OnError 格式 function 错误回调 |