|
@@ -328,6 +328,8 @@ SmallVideo.prototype.hasVideo = function () {
|
328
|
328
|
|
329
|
329
|
/**
|
330
|
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
|
334
|
* @param show whether we should show the avatar or not
|
333
|
335
|
* video because there is no dominant speaker and no focused speaker
|
|
@@ -347,12 +349,13 @@ SmallVideo.prototype.updateView = function () {
|
347
|
349
|
|
348
|
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
|
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
|
359
|
showAvatar = true;
|
357
|
360
|
} else {
|
358
|
361
|
// We want to show the avatar when the video is muted or not exists
|
|
@@ -360,6 +363,8 @@ SmallVideo.prototype.updateView = function () {
|
360
|
363
|
showAvatar = !this.stream || this.stream.isMuted();
|
361
|
364
|
}
|
362
|
365
|
|
|
366
|
+ showAvatar = showAvatar && !isCurrentlyOnLarge;
|
|
367
|
+
|
363
|
368
|
if (video && video.length > 0) {
|
364
|
369
|
setVisibility(video, showVideo);
|
365
|
370
|
}
|