Authored by yyq

fix offline video

@@ -108,12 +108,13 @@ export default { @@ -108,12 +108,13 @@ export default {
108 return type; 108 return type;
109 } 109 }
110 }, 110 },
  111 + watch: {
  112 + source() {
  113 + this.showPlayer();
  114 + }
  115 + },
111 mounted() { 116 mounted() {
112 - this.showVideo = true;  
113 -  
114 - this.$nextTick(() => {  
115 - this.initPlayer();  
116 - }); 117 + this.showPlayer();
117 }, 118 },
118 beforeDestroy() { 119 beforeDestroy() {
119 if (this.player) { 120 if (this.player) {
@@ -121,6 +122,16 @@ export default { @@ -121,6 +122,16 @@ export default {
121 } 122 }
122 }, 123 },
123 methods: { 124 methods: {
  125 + showPlayer() {
  126 + if (this.showVideo || !this.source) {
  127 + return;
  128 + }
  129 +
  130 + this.showVideo = true;
  131 + this.$nextTick(() => {
  132 + this.initPlayer();
  133 + });
  134 + },
124 initPlayer() { 135 initPlayer() {
125 const noVioceClass = 'vjs-yoho-novoice'; 136 const noVioceClass = 'vjs-yoho-novoice';
126 137
1 { 1 {
2 "name": "yoho-community-web", 2 "name": "yoho-community-web",
3 - "version": "6.9.8-beta6", 3 + "version": "6.9.8-beta7",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {