瀏覽代碼

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,7 +446,15 @@ export default class LargeVideoManager {
446 446
 
447 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 458
             let {id, stream, videoType, resolve} = this.newStreamData;
451 459
             this.newStreamData = null;
452 460
 

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

@@ -404,7 +404,11 @@ var VideoLayout = {
404 404
             this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE)) ||
405 405
             pinnedId === resourceJid ||
406 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 412
             this.updateLargeVideo(resourceJid, true);
409 413
         }
410 414
     },

Loading…
取消
儲存