Fix issue updating large video 'src' while on stage

This commit is contained in:
paweldomas 2016-04-26 15:42:18 -05:00
parent 0116f547ed
commit f2c9b8b7a5
2 changed files with 14 additions and 2 deletions

View File

@ -446,7 +446,15 @@ export default class LargeVideoManager {
let container = this.getContainer(this.state); let container = this.getContainer(this.state);
container.hide().then(() => { // Include hide()/fadeOut only if we're switching between users
let preUpdate;
if (this.newStreamData.id != this.id) {
preUpdate = container.hide();
} else {
preUpdate = Promise.resolve();
}
preUpdate.then(() => {
let {id, stream, videoType, resolve} = this.newStreamData; let {id, stream, videoType, resolve} = this.newStreamData;
this.newStreamData = null; this.newStreamData = null;

View File

@ -404,7 +404,11 @@ var VideoLayout = {
this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE)) || this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE)) ||
pinnedId === resourceJid || pinnedId === resourceJid ||
(!pinnedId && resourceJid && (!pinnedId && resourceJid &&
currentDominantSpeaker === resourceJid)) { currentDominantSpeaker === resourceJid) ||
/* Playback started while we're on the stage - may need to update
video source with the new stream */
this.isCurrentlyOnLarge(resourceJid)) {
this.updateLargeVideo(resourceJid, true); this.updateLargeVideo(resourceJid, true);
} }
}, },