|
@@ -36,12 +36,6 @@ function SmallVideo(VideoLayout) {
|
36
|
36
|
this.VideoLayout = VideoLayout;
|
37
|
37
|
}
|
38
|
38
|
|
39
|
|
-function setVisibility(selector, show) {
|
40
|
|
- if (selector && selector.length > 0) {
|
41
|
|
- selector.css("visibility", show ? "visible" : "hidden");
|
42
|
|
- }
|
43
|
|
-}
|
44
|
|
-
|
45
|
39
|
/**
|
46
|
40
|
* Returns the identifier of this small video.
|
47
|
41
|
*
|
|
@@ -395,6 +389,16 @@ SmallVideo.prototype.$avatar = function () {
|
395
|
389
|
return $('#' + this.videoSpanId + ' .userAvatar');
|
396
|
390
|
};
|
397
|
391
|
|
|
392
|
+/**
|
|
393
|
+ * Returns the display name element, which appears on the video thumbnail.
|
|
394
|
+ *
|
|
395
|
+ * @return {jQuery} a jQuery selector pointing to the display name element of
|
|
396
|
+ * the video thumbnail
|
|
397
|
+ */
|
|
398
|
+SmallVideo.prototype.$displayName = function () {
|
|
399
|
+ return $('#' + this.videoSpanId + ' .displayname');
|
|
400
|
+};
|
|
401
|
+
|
398
|
402
|
/**
|
399
|
403
|
* Enables / disables the css responsible for focusing/pinning a video
|
400
|
404
|
* thumbnail.
|
|
@@ -479,10 +483,15 @@ SmallVideo.prototype.updateView = function () {
|
479
|
483
|
|
480
|
484
|
// Determine whether video, avatar or blackness should be displayed
|
481
|
485
|
let displayMode = this.selectDisplayMode();
|
482
|
|
- // Show/hide video
|
483
|
|
- setVisibility(this.selectVideoElement(), displayMode === DISPLAY_VIDEO);
|
484
|
|
- // Show/hide the avatar
|
485
|
|
- setVisibility(this.$avatar(), displayMode === DISPLAY_AVATAR);
|
|
486
|
+ // Show/hide video.
|
|
487
|
+ UIUtil.setVisibility( this.selectVideoElement(),
|
|
488
|
+ displayMode === DISPLAY_VIDEO);
|
|
489
|
+ // Show/hide the avatar.
|
|
490
|
+ UIUtil.setVisibility( this.$avatar(),
|
|
491
|
+ displayMode === DISPLAY_AVATAR);
|
|
492
|
+ // Show/hide the display name.
|
|
493
|
+ UIUtil.setVisibility( this.$displayName(),
|
|
494
|
+ displayMode === DISPLAY_BLACKNESS);
|
486
|
495
|
};
|
487
|
496
|
|
488
|
497
|
SmallVideo.prototype.avatarChanged = function (avatarUrl) {
|