flv.js播放flv
作者:互联网
flv cdn
https://www.bootcdn.cn/flv.js/
举例
<script src="dist/js/flv.min.js"></script>
<video id="videoElement" controls autoplay width="1024" height="576"></video>
<script>
if (flvjs.isSupported()) {
var videoElement = document.getElementById('videoElement');
var flvPlayer = flvjs.createPlayer({
type: 'flv',
url: 'http://39.106.70.134:8100/flv?port=1935&app=live'
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
</script>
运行效果
标签:videoElement,flvPlayer,js,flv,var,播放,flvjs 来源: https://www.cnblogs.com/zhangxuechao/p/14623129.html