今天继续给小伙伴们分享一个西瓜视频播放器Vue组件XGPlayer-Vue。
xgplayer-vue 西瓜视频播放器xgplayer的vue.js版本组件。
安装
$ npm i xgplayer-vue@latest -S
使用插件
// 当前播放时间console.log(this.Player.currentTime)// 方法this.Player.play();this.Player.pause();this.Player.reload();// 播放事件this.Player.on('play', ()=>{console.log('play')})
更多的诸如尺寸、音量及自动播放等配置可去查看详细配置参数。
https://v2.h5player.bytedance.com/en/config