1.0.3 • Published 6 years ago
vue-media-player v1.0.3
Install
npm
npm install vue-media-player --save
Usage
<my-video :sources="video.sources" :options="video.options" :errorMsg="video.errorMsg"></my-video>
// script
import myVideo from 'vue-media-player'
export default {
data() {
return {
video: {
sources: [{
src: srcUrl,
type: 'video/mp4'
}],
options: {
autoplay: false,
volume: 0.6,
poster: 'https://github.com/EARL8888/SrcPath/blob/master/video/video_poster.jpg?raw=true'
},
errorMsg:'视频加载失败!'
}
}
},
components: {
myVideo
}
}