浏览代码

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
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8
    1
      modules/UI/videolayout/LargeVideoManager.js

+ 8
- 1
modules/UI/videolayout/LargeVideoManager.js 查看文件

168
     get id() {
168
     get id() {
169
         const container = this.getCurrentContainer();
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
         return container.id;
179
         return container.id;
173
     }
180
     }
184
 
191
 
185
         // Include hide()/fadeOut only if we're switching between users
192
         // Include hide()/fadeOut only if we're switching between users
186
         // eslint-disable-next-line eqeqeq
193
         // eslint-disable-next-line eqeqeq
187
-        const isUserSwitch = this.newStreamData.id != this.id;
188
         const container = this.getCurrentContainer();
194
         const container = this.getCurrentContainer();
195
+        const isUserSwitch = this.newStreamData.id !== container.id;
189
         const preUpdate = isUserSwitch ? container.hide() : Promise.resolve();
196
         const preUpdate = isUserSwitch ? container.hide() : Promise.resolve();
190
 
197
 
191
         preUpdate.then(() => {
198
         preUpdate.then(() => {

正在加载...
取消
保存