liuyu 4 роки тому
батько
коміт
ec9777a9b0
1 змінених файлів з 8 додано та 1 видалено
  1. 8 1
      src/views/live/roomDetail.vue

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

@@ -646,7 +646,14 @@ export default {
             this.rvideoid_ = 'video_' + remoteStream.getId();
             // this.zbfullbtn();
             const newdata_ = { strem: remoteStream, type: 'mainr' };
-            this.stremlist.push(newdata_);
+            const mainstrem_ = _.find(this.stremlist, { type: 'mainr' });
+            if (mainstrem_) {
+              const newdatas = [];
+              datas.push(newdata_);
+              this.$set(this, `stremlist`, newdatas);
+            } else {
+              this.stremlist.push(newdata_);
+            }
             if (this.swichzjrid) {
               const swichstrem = _.find(this.stremOtherlist, { switchzjrid: this.swichzjrid, type: 'other' });
               if (swichstrem) {