Quellcode durchsuchen

Merge pull request #629 from jitsi/lipsync

Lipsync
j8
bgrozev vor 9 Jahren
Ursprung
Commit
5cb2b15b54
3 geänderte Dateien mit 17 neuen und 2 gelöschten Zeilen
  1. 3
    0
      conference.js
  2. 9
    1
      modules/UI/videolayout/LargeVideo.js
  3. 5
    1
      modules/UI/videolayout/VideoLayout.js

+ 3
- 0
conference.js Datei anzeigen

@@ -557,6 +557,9 @@ export default {
557 557
                 this.useAudioStream(track);
558 558
             } else if (track.isVideoTrack()) {
559 559
                 this.useVideoStream(track);
560
+            } else {
561
+                console.error(
562
+                    "Ignored not an audio nor a video track: ", track);
560 563
             }
561 564
         });
562 565
         roomLocker = createRoomLocker(room);

+ 9
- 1
modules/UI/videolayout/LargeVideo.js Datei anzeigen

@@ -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 Datei anzeigen

@@ -410,7 +410,11 @@ var VideoLayout = {
410 410
             this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE)) ||
411 411
             pinnedId === resourceJid ||
412 412
             (!pinnedId && resourceJid &&
413
-                currentDominantSpeaker === resourceJid)) {
413
+                currentDominantSpeaker === resourceJid) ||
414
+            /* Playback started while we're on the stage - may need to update
415
+               video source with the new stream */
416
+            this.isCurrentlyOnLarge(resourceJid)) {
417
+
414 418
             this.updateLargeVideo(resourceJid, true);
415 419
         }
416 420
     },

Laden…
Abbrechen
Speichern