Commit e5d564e9 authored by xinzhedeai's avatar xinzhedeai

视频videojs实例销毁

parent c97eb7a5
......@@ -100,7 +100,12 @@ export default {
name: "videoMonitor",
data() {
return {
player: null,
player1: null,
player2: null,
player3: null,
player4: null,
player5: null,
player6: null,
// sources: [
// {
// src: 'https://gctxyc.liveplay.myqcloud.com/gc/gccntv241-slf01_1/index.m3u8',
......@@ -148,7 +153,7 @@ export default {
},
}
this.player = videojs(this.$refs.videoPlayer6, videoConfig);
this.player6 = videojs(this.$refs.videoPlayer6, videoConfig);
videoConfig.autoplay = false
......@@ -163,8 +168,23 @@ export default {
},
methods: {},
beforeDestroy() {
if (this.player) {
this.player.dispose();
if (this.player1) {
this.player1.dispose();
}
if (this.player2) {
this.player2.dispose();
}
if (this.player3) {
this.player3.dispose();
}
if (this.player4) {
this.player4.dispose();
}
if (this.player5) {
this.player5.dispose();
}
if (this.player6) {
this.player6.dispose();
}
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment