liuyu 4 năm trước cách đây
mục cha
commit
4174d6b04a
1 tập tin đã thay đổi với 8 bổ sung6 xóa
  1. 8 6
      src/views/live/roomDetail.vue

+ 8 - 6
src/views/live/roomDetail.vue

@@ -440,13 +440,15 @@ export default {
     },
     async swichzjrVideo(switchzjr) {
       //
-      const swichstrem = _.find(this.stremOtherlist, { switchzjrid: switchzjr, type: 'other' });
-      if (swichstrem) {
-        const oldstrem_ = _.find(this.stremlist, { type: 'mainr' });
-        if (oldstrem_) {
-          this.stermStop(oldstrem_.strem);
+      if (this.stremOtherlist.length > 0) {
+        const swichstrem = _.find(this.stremOtherlist, { switchzjrid: switchzjr, type: 'other' });
+        if (swichstrem) {
+          const oldstrem_ = _.find(this.stremlist, { type: 'mainr' });
+          if (oldstrem_) {
+            this.stermStop(oldstrem_.strem);
+          }
+          this.stermPlay(swichstrem.strem, 'look-video-right');
         }
-        this.stermPlay(swichstrem.strem, 'look-video-right');
       }
     },
     async swichzbVideo(switchzjr) {