liuyu 4 years ago
parent
commit
ebff61701e
1 changed files with 35 additions and 32 deletions
  1. 35 32
      src/views/live/roomDetail.vue

+ 35 - 32
src/views/live/roomDetail.vue

@@ -380,38 +380,41 @@ export default {
           console.log('111' + remoteStream.getId());
           const userid_ = remoteStream.getUserId();
           const res_ = userid_.indexOf('-');
-          if (res_ === -1) {
-            this.rvideoid_ = 'video_' + remoteStream.getId();
-            remoteStream
-              .play('look-video-right')
-              .then(() => {
-                // autoplay success
-              })
-              .catch(e => {
-                const errorCode = e.getCode();
-                if (errorCode === 0x4043) {
-                  // PLAY_NOT_ALLOWED,引导用户手势操作恢复音视频播放
-                  remoteStream.resume();
-                }
-              });
-          } else {
-            this.lvideoid_ = 'video_' + remoteStream.getId();
-            remoteStream
-              .play('look-video-left')
-              .then(() => {
-                // autoplay success
-                // 播放成功时调用css属性
-                const _lvideoid_ = document.getElementById(this.lvideoid_);
-                const style = 'width: 100%; height: 100%; position: absolute; transform: rotateY(0); object-fit: fill';
-                _lvideoid_.style.cssText = style;
-              })
-              .catch(e => {
-                const errorCode = e.getCode();
-                if (errorCode === 0x4043) {
-                  // PLAY_NOT_ALLOWED,引导用户手势操作恢复音视频播放
-                  remoteStream.resume();
-                }
-              });
+          const useridsplit_ = userid_.substring(0, 5);
+          if (useridsplit_ !== 'wxxcx') {
+            if (res_ === -1) {
+              this.rvideoid_ = 'video_' + remoteStream.getId();
+              remoteStream
+                .play('look-video-right')
+                .then(() => {
+                  // autoplay success
+                })
+                .catch(e => {
+                  const errorCode = e.getCode();
+                  if (errorCode === 0x4043) {
+                    // PLAY_NOT_ALLOWED,引导用户手势操作恢复音视频播放
+                    remoteStream.resume();
+                  }
+                });
+            } else {
+              this.lvideoid_ = 'video_' + remoteStream.getId();
+              remoteStream
+                .play('look-video-left')
+                .then(() => {
+                  // autoplay success
+                  // 播放成功时调用css属性
+                  const _lvideoid_ = document.getElementById(this.lvideoid_);
+                  const style = 'width: 100%; height: 100%; position: absolute; transform: rotateY(0); object-fit: fill';
+                  _lvideoid_.style.cssText = style;
+                })
+                .catch(e => {
+                  const errorCode = e.getCode();
+                  if (errorCode === 0x4043) {
+                    // PLAY_NOT_ALLOWED,引导用户手势操作恢复音视频播放
+                    remoteStream.resume();
+                  }
+                });
+            }
           }
         });
         // 监听远端流增加事件