Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(large-video): respect update in progress when queuing update (#4078)

virtuacoplennyc6e5adbe0ef6
diff --git a/modules/UI/videolayout/LargeVideoManager.js b/modules/UI/videolayout/LargeVideoManager.js
index 769d0fa93f..5c350ef823 100644
--- a/modules/UI/videolayout/LargeVideoManager.js
+++ b/modules/UI/videolayout/LargeVideoManager.js
@@ -168,6 +168,13 @@ export default class LargeVideoManager {
get id() {
const container = this.getCurrentContainer();
+ // If a user switch for large video is in progress then provide what
+ // will be the end result of the update.
+ if (this.updateInProcess
+ && this.newStreamData
+ && this.newStreamData.id !== container.id) {
+ return this.newStreamData.id;
+ }
return container.id;
}
@@ -184,8 +191,8 @@ export default class LargeVideoManager {
// Include hide()/fadeOut only if we're switching between users
// eslint-disable-next-line eqeqeq
- const isUserSwitch = this.newStreamData.id != this.id;
const container = this.getCurrentContainer();
+ const isUserSwitch = this.newStreamData.id !== container.id;
const preUpdate = isUserSwitch ? container.hide() : Promise.resolve();
preUpdate.then(() => {