插件github地址:https://github.com/videojs/video.js

这边做一个切换视频vue url的解决记录

        this.$nextTick(() => {
let u = this.res.videoResult.videoPath
document.getElementById('video_source').setAttribute('src', u)
let myPlayer = videojs('yhqzVideo') // 初始化视频
myPlayer.src(u) //重置video的src
myPlayer.load(u) //使video重新加载
this.myPlayer = myPlayer
})

  

05-23 03:34