标签:gpl error url rip ack npm fun png load
安装插件
npm install --save video.js
npm install --save videojs-contrib-hls
导入css
import 'video.js/dist/video-js.css'
导入js
import videojs from 'video.js'
import 'videojs-contrib-hls
指定播放容器
<video id="my-video" class="video-js vjs-default-skin" controls preload="auto" poster="../assets/video.png">
<source src="http://xxx/1.m3u8" type="application/x-mpegURL">
</video>
在mounted上
videojs('my-video', {
bigPlayButton: false,
textTrackDisplay: false,
posterImage: true,
errorDisplay: false,
controlBar: true
},
function () {
this.play()
}
)
标签:gpl error url rip ack npm fun png load
原文地址:https://www.cnblogs.com/wuxiaoshi/p/11756616.html