浏览代码

Fix issue updating large video 'src' while on stage

j8
paweldomas 9 年前
父节点
当前提交
f2c9b8b7a5
共有 2 个文件被更改,包括 14 次插入2 次删除
  1. 9
    1
      modules/UI/videolayout/LargeVideo.js
  2. 5
    1
      modules/UI/videolayout/VideoLayout.js

+ 9
- 1
modules/UI/videolayout/LargeVideo.js 查看文件

446
 
446
 
447
         let container = this.getContainer(this.state);
447
         let container = this.getContainer(this.state);
448
 
448
 
449
-        container.hide().then(() => {
449
+        // Include hide()/fadeOut only if we're switching between users
450
+        let preUpdate;
451
+        if (this.newStreamData.id != this.id) {
452
+            preUpdate = container.hide();
453
+        } else {
454
+            preUpdate = Promise.resolve();
455
+        }
456
+        
457
+        preUpdate.then(() => {
450
             let {id, stream, videoType, resolve} = this.newStreamData;
458
             let {id, stream, videoType, resolve} = this.newStreamData;
451
             this.newStreamData = null;
459
             this.newStreamData = null;
452
 
460
 

+ 5
- 1
modules/UI/videolayout/VideoLayout.js 查看文件

404
             this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE)) ||
404
             this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE)) ||
405
             pinnedId === resourceJid ||
405
             pinnedId === resourceJid ||
406
             (!pinnedId && resourceJid &&
406
             (!pinnedId && resourceJid &&
407
-                currentDominantSpeaker === resourceJid)) {
407
+                currentDominantSpeaker === resourceJid) ||
408
+            /* Playback started while we're on the stage - may need to update
409
+               video source with the new stream */
410
+            this.isCurrentlyOnLarge(resourceJid)) {
411
+
408
             this.updateLargeVideo(resourceJid, true);
412
             this.updateLargeVideo(resourceJid, true);
409
         }
413
         }
410
     },
414
     },

正在加载...
取消
保存