瀏覽代碼

Fixes showing display name and hiding avtar, when video is muted and avtar is on large.

master
damencho 10 年之前
父節點
當前提交
cd4ebca730
共有 1 個檔案被更改,包括 10 行新增5 行删除
  1. 10
    5
      modules/UI/videolayout/SmallVideo.js

+ 10
- 5
modules/UI/videolayout/SmallVideo.js 查看文件

328
 
328
 
329
 /**
329
 /**
330
  * Hides or shows the user's avatar.
330
  * Hides or shows the user's avatar.
331
+ * This update assumes that large video had been updated and we will
332
+ * reflect it on this small video.
331
  *
333
  *
332
  * @param show whether we should show the avatar or not
334
  * @param show whether we should show the avatar or not
333
  * video because there is no dominant speaker and no focused speaker
335
  * video because there is no dominant speaker and no focused speaker
347
 
349
 
348
     let avatar = $(`#avatar_${this.id}`);
350
     let avatar = $(`#avatar_${this.id}`);
349
 
351
 
350
-    var showVideo = !this.isVideoMuted
351
-                        && !this.VideoLayout.isCurrentlyOnLarge(this.id);
352
+    var isCurrentlyOnLarge = this.VideoLayout.isCurrentlyOnLarge(this.id);
353
+
354
+    var showVideo = !this.isVideoMuted && !isCurrentlyOnLarge;
352
     var showAvatar;
355
     var showAvatar;
353
-    if ((!this.isLocal &&
354
-        !this.VideoLayout.isInLastN(this.id)) ||
355
-        this.isVideoMuted) {
356
+    if ((!this.isLocal
357
+            && !this.VideoLayout.isInLastN(this.id))
358
+        || this.isVideoMuted) {
356
         showAvatar = true;
359
         showAvatar = true;
357
     } else {
360
     } else {
358
         // We want to show the avatar when the video is muted or not exists
361
         // We want to show the avatar when the video is muted or not exists
360
         showAvatar = !this.stream || this.stream.isMuted();
363
         showAvatar = !this.stream || this.stream.isMuted();
361
     }
364
     }
362
 
365
 
366
+    showAvatar = showAvatar && !isCurrentlyOnLarge;
367
+
363
     if (video && video.length > 0) {
368
     if (video && video.length > 0) {
364
         setVisibility(video, showVideo);
369
         setVisibility(video, showVideo);
365
     }
370
     }

Loading…
取消
儲存