Преглед на файлове

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

When a fade in/out animation is in progress, another large
video update can be queued but can try to force itself onto
large video. For example a pin can be in progress and while
the fade in/out animation plays, local video can change its
video type during the animation and forcing an update of
large video. This results in local video getting forcible
updated onto large video while the pinned video is left on
small video only.
j8
virtuacoplenny преди 6 години
родител
ревизия
c6e5adbe0e
No account linked to committer's email address
променени са 1 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 8
    1
      modules/UI/videolayout/LargeVideoManager.js

+ 8
- 1
modules/UI/videolayout/LargeVideoManager.js Целия файл

@@ -168,6 +168,13 @@ export default class LargeVideoManager {
168 168
     get id() {
169 169
         const container = this.getCurrentContainer();
170 170
 
171
+        // If a user switch for large video is in progress then provide what
172
+        // will be the end result of the update.
173
+        if (this.updateInProcess
174
+            && this.newStreamData
175
+            && this.newStreamData.id !== container.id) {
176
+            return this.newStreamData.id;
177
+        }
171 178
 
172 179
         return container.id;
173 180
     }
@@ -184,8 +191,8 @@ export default class LargeVideoManager {
184 191
 
185 192
         // Include hide()/fadeOut only if we're switching between users
186 193
         // eslint-disable-next-line eqeqeq
187
-        const isUserSwitch = this.newStreamData.id != this.id;
188 194
         const container = this.getCurrentContainer();
195
+        const isUserSwitch = this.newStreamData.id !== container.id;
189 196
         const preUpdate = isUserSwitch ? container.hide() : Promise.resolve();
190 197
 
191 198
         preUpdate.then(() => {

Loading…
Отказ
Запис