Browse Source

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

j8
damencho 9 years ago
parent
commit
2b26580a7c

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

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 View File

54
     showAvatar (show) {
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 View File

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 View File

524
         // since we don't want to switch to local video.
524
         // since we don't want to switch to local video.
525
         // Update the large video if the video source is already available,
525
         // Update the large video if the video source is already available,
526
         // otherwise wait for the "videoactive.jingle" event.
526
         // otherwise wait for the "videoactive.jingle" event.
527
-        if (!focusedVideoResourceJid && remoteVideo.hasVideoStarted()) {
527
+        if (!focusedVideoResourceJid
528
+            && remoteVideo.hasVideoStarted()
529
+            && !this.getCurrentlyOnLargeContainer().stayOnStage()) {
528
             this.updateLargeVideo(id);
530
             this.updateLargeVideo(id);
529
         }
531
         }
530
     },
532
     },
889
         return this.isLargeContainerTypeVisible(VideoContainerType);
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
     isCurrentlyOnLarge (id) {
902
     isCurrentlyOnLarge (id) {
893
         return largeVideo && largeVideo.id === id;
903
         return largeVideo && largeVideo.id === id;
894
     },
904
     },

Loading…
Cancel
Save