...
|
...
|
@@ -108,12 +108,13 @@ export default { |
|
|
return type;
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
source() {
|
|
|
this.showPlayer();
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.showVideo = true;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
this.initPlayer();
|
|
|
});
|
|
|
this.showPlayer();
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
if (this.player) {
|
...
|
...
|
@@ -121,6 +122,16 @@ export default { |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
showPlayer() {
|
|
|
if (this.showVideo || !this.source) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
this.showVideo = true;
|
|
|
this.$nextTick(() => {
|
|
|
this.initPlayer();
|
|
|
});
|
|
|
},
|
|
|
initPlayer() {
|
|
|
const noVioceClass = 'vjs-yoho-novoice';
|
|
|
|
...
|
...
|
|