提交 46d5287a authored 作者: pengxiaohui's avatar pengxiaohui

修复视频多次切换播放失效的bug

上级 44dece05
......@@ -15,19 +15,24 @@ export default {
},
data() {
return {
player: null
}
},
mounted() {
const url = this.info.url
setTimeout(() => {
const player = window.videojs('videoPlayer')
player.src({
this.player = window.videojs('videoPlayer')
this.player.src({
src: url,
type: 'application/x-mpegURL'
// withCredentials: true
})
player.play()
console.log(123)
this.player.play()
}, 300)
},
beforeDestroy() {
this.player.dispose()
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论