liuyu 4 rokov pred
rodič
commit
140963ed3c
1 zmenil súbory, kde vykonal 20 pridanie a 7 odobranie
  1. 20 7
      src/views/live/roomDetail.vue

+ 20 - 7
src/views/live/roomDetail.vue

@@ -407,7 +407,8 @@ export default {
         if (body.switchrole === 'anchor' && body.userid === this.user.uid) {
           this.switchbtn = true;
           this.switchmeetbtn = true;
-          this.roomMeetSwich();
+          // this.roomMeetSwich();
+          this.roomMeetBtn();
         } else {
           this.switchbtn = false;
           this.switchmeetbtn = false;
@@ -789,12 +790,24 @@ export default {
             }
           } else if (useridsplit_ === 'wxxcx') {
             console.log('小程序进入画面' + this.index_);
-            // this.index_ = this.index_ + 1;
-            // if (this.index_ < 11) {
-            //   const id_ = 'othe-video-' + this.index_;
-            //   console.log(id_);
-            //   remoteStream.play(id_);
-            // }
+            this.othedivshow = true;
+            this.oheight = '270px';
+            this.otheheight = '70px';
+            this.iscamera = true;
+            this.index_ = this.index_ + 1;
+            if (this.index_ < 11) {
+              const id_ = 'othe-video-' + this.index_;
+              const newdata_ = { strem: remoteStream, index: this.index_, id: id_, swichuserid: userid_zs };
+              this.stremMeetlist.push(newdata_);
+              console.log(id_);
+              const newdata = { swichuserid: userid_zs, swichindex: this.index_ };
+              this.swichusers.push(newdata);
+              console.log('将用户push到列表里' + newdata);
+              this.stermStop(remoteStream);
+              this.$nextTick(() => {
+                remoteStream.play(id_);
+              });
+            }
           }
         });
         // 监听远端流增加事件