Sfoglia il codice sorgente

Disables switching to dominant speaker when Etherpad is shown on large video.

j8
damencho 9 anni fa
parent
commit
2b26580a7c

+ 7
- 0
modules/UI/etherpad/Etherpad.js Vedi File

@@ -133,6 +133,13 @@ class Etherpad extends LargeContainer {
133 133
             });
134 134
         });
135 135
     }
136
+
137
+    /**
138
+     * @return {boolean} do not switch on dominant speaker event if on stage.
139
+     */
140
+    stayOnStage () {
141
+        return true;
142
+    }
136 143
 }
137 144
 
138 145
 /**

+ 7
- 0
modules/UI/videolayout/LargeContainer.js Vedi File

@@ -54,4 +54,11 @@ export default class LargeContainer {
54 54
     showAvatar (show) {
55 55
     }
56 56
 
57
+    /**
58
+     * Whether current container needs to be switched on dominant speaker event
59
+     * when the container is on stage.
60
+     * @return {boolean}
61
+     */
62
+    stayOnStage () {
63
+    }
57 64
 }

+ 7
- 0
modules/UI/videolayout/LargeVideo.js Vedi File

@@ -349,6 +349,13 @@ class VideoContainer extends LargeContainer {
349 349
             });
350 350
         });
351 351
     }
352
+
353
+    /**
354
+     * @return {boolean} switch on dominant speaker event if on stage.
355
+     */
356
+    stayOnStage () {
357
+        return false;
358
+    }
352 359
 }
353 360
 
354 361
 /**

+ 11
- 1
modules/UI/videolayout/VideoLayout.js Vedi File

@@ -524,7 +524,9 @@ var VideoLayout = {
524 524
         // since we don't want to switch to local video.
525 525
         // Update the large video if the video source is already available,
526 526
         // otherwise wait for the "videoactive.jingle" event.
527
-        if (!focusedVideoResourceJid && remoteVideo.hasVideoStarted()) {
527
+        if (!focusedVideoResourceJid
528
+            && remoteVideo.hasVideoStarted()
529
+            && !this.getCurrentlyOnLargeContainer().stayOnStage()) {
528 530
             this.updateLargeVideo(id);
529 531
         }
530 532
     },
@@ -889,6 +891,14 @@ var VideoLayout = {
889 891
         return this.isLargeContainerTypeVisible(VideoContainerType);
890 892
     },
891 893
 
894
+    /**
895
+     * @return {LargeContainer} the currently displayed container on large
896
+     * video.
897
+     */
898
+    getCurrentlyOnLargeContainer () {
899
+        return largeVideo.getContainer(largeVideo.state);
900
+    },
901
+
892 902
     isCurrentlyOnLarge (id) {
893 903
         return largeVideo && largeVideo.id === id;
894 904
     },

Loading…
Annulla
Salva