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

This commit is contained in:
damencho 2016-03-17 22:19:09 -05:00
parent eefdbd4fe5
commit 2b26580a7c
4 changed files with 32 additions and 1 deletions

View File

@ -133,6 +133,13 @@ class Etherpad extends LargeContainer {
});
});
}
/**
* @return {boolean} do not switch on dominant speaker event if on stage.
*/
stayOnStage () {
return true;
}
}
/**

View File

@ -54,4 +54,11 @@ export default class LargeContainer {
showAvatar (show) {
}
/**
* Whether current container needs to be switched on dominant speaker event
* when the container is on stage.
* @return {boolean}
*/
stayOnStage () {
}
}

View File

@ -349,6 +349,13 @@ class VideoContainer extends LargeContainer {
});
});
}
/**
* @return {boolean} switch on dominant speaker event if on stage.
*/
stayOnStage () {
return false;
}
}
/**

View File

@ -524,7 +524,9 @@ var VideoLayout = {
// since we don't want to switch to local video.
// Update the large video if the video source is already available,
// otherwise wait for the "videoactive.jingle" event.
if (!focusedVideoResourceJid && remoteVideo.hasVideoStarted()) {
if (!focusedVideoResourceJid
&& remoteVideo.hasVideoStarted()
&& !this.getCurrentlyOnLargeContainer().stayOnStage()) {
this.updateLargeVideo(id);
}
},
@ -889,6 +891,14 @@ var VideoLayout = {
return this.isLargeContainerTypeVisible(VideoContainerType);
},
/**
* @return {LargeContainer} the currently displayed container on large
* video.
*/
getCurrentlyOnLargeContainer () {
return largeVideo.getContainer(largeVideo.state);
},
isCurrentlyOnLarge (id) {
return largeVideo && largeVideo.id === id;
},