|
|
@@ -195,9 +195,9 @@ var VideoLayout = {
|
|
195
|
195
|
|
|
196
|
196
|
localVideoThumbnail.changeVideo(stream);
|
|
197
|
197
|
|
|
198
|
|
- /* force update if we're currently being displayed */
|
|
|
198
|
+ /* Update if we're currently being displayed */
|
|
199
|
199
|
if (this.isCurrentlyOnLarge(localId)) {
|
|
200
|
|
- this.updateLargeVideo(localId, true);
|
|
|
200
|
+ this.updateLargeVideo(localId);
|
|
201
|
201
|
}
|
|
202
|
202
|
},
|
|
203
|
203
|
|
|
|
@@ -761,7 +761,7 @@ var VideoLayout = {
|
|
761
|
761
|
if (remoteVideo) {
|
|
762
|
762
|
remoteVideo.updateView();
|
|
763
|
763
|
if (remoteVideo.isCurrentlyOnLargeVideo()) {
|
|
764
|
|
- this.updateLargeVideo(id, true);
|
|
|
764
|
+ this.updateLargeVideo(id);
|
|
765
|
765
|
}
|
|
766
|
766
|
}
|
|
767
|
767
|
},
|
|
|
@@ -1010,8 +1010,26 @@ var VideoLayout = {
|
|
1010
|
1010
|
if (!largeVideo) {
|
|
1011
|
1011
|
return;
|
|
1012
|
1012
|
}
|
|
1013
|
|
- let isOnLarge = this.isCurrentlyOnLarge(id);
|
|
1014
|
|
- let currentId = largeVideo.id;
|
|
|
1013
|
+ const currentContainer = largeVideo.getCurrentContainer();
|
|
|
1014
|
+ const currentContainerType = largeVideo.getCurrentContainerType();
|
|
|
1015
|
+ const currentId = largeVideo.id;
|
|
|
1016
|
+ const isOnLarge = this.isCurrentlyOnLarge(id);
|
|
|
1017
|
+ const smallVideo = this.getSmallVideo(id);
|
|
|
1018
|
+
|
|
|
1019
|
+ if (isOnLarge && !forceUpdate
|
|
|
1020
|
+ && LargeVideoManager.isVideoContainer(currentContainerType)
|
|
|
1021
|
+ && smallVideo) {
|
|
|
1022
|
+ const currentStreamId = currentContainer.getStreamID();
|
|
|
1023
|
+ const newStreamId
|
|
|
1024
|
+ = smallVideo.videoStream
|
|
|
1025
|
+ ? smallVideo.videoStream.getId() : null;
|
|
|
1026
|
+
|
|
|
1027
|
+ // FIXME it might be possible to get rid of 'forceUpdate' argument
|
|
|
1028
|
+ if (currentStreamId !== newStreamId) {
|
|
|
1029
|
+ logger.debug('Enforcing large video update for stream change');
|
|
|
1030
|
+ forceUpdate = true;
|
|
|
1031
|
+ }
|
|
|
1032
|
+ }
|
|
1015
|
1033
|
|
|
1016
|
1034
|
if (!isOnLarge || forceUpdate) {
|
|
1017
|
1035
|
let videoType = this.getRemoteVideoType(id);
|
|
|
@@ -1020,7 +1038,6 @@ var VideoLayout = {
|
|
1020
|
1038
|
eventEmitter.emit(UIEvents.SELECTED_ENDPOINT, id);
|
|
1021
|
1039
|
}
|
|
1022
|
1040
|
|
|
1023
|
|
- let smallVideo = this.getSmallVideo(id);
|
|
1024
|
1041
|
let oldSmallVideo;
|
|
1025
|
1042
|
if (currentId) {
|
|
1026
|
1043
|
oldSmallVideo = this.getSmallVideo(currentId);
|