diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js index 43e4ce872..6d577765a 100644 --- a/modules/UI/videolayout/RemoteVideo.js +++ b/modules/UI/videolayout/RemoteVideo.js @@ -19,7 +19,6 @@ function RemoteVideo(id, VideoLayout, emitter) { this.setDisplayName(); this.flipX = false; this.isLocal = false; - this.isMuted = false; } RemoteVideo.prototype = Object.create(SmallVideo.prototype); @@ -61,7 +60,7 @@ RemoteVideo.prototype._initPopupMenu = function (popupMenuElement) { this.popover.show = function () { // update content by forcing it, to finish even if popover // is not visible - this.updateRemoteVideoMenu(this.isMuted, true); + this.updateRemoteVideoMenu(this.isAudioMuted, true); // call the original show, passing its actual this origShowFunc.call(this.popover); }.bind(this); @@ -97,7 +96,7 @@ RemoteVideo.prototype._generatePopupContent = function () { muteLinkItem.id = "mutelink_" + this.id; - if (this.isMuted) { + if (this.isAudioMuted) { muteLinkItem.innerHTML = mutedHTML; muteLinkItem.className = 'mutelink disabled'; } @@ -109,7 +108,7 @@ RemoteVideo.prototype._generatePopupContent = function () { // Delegate event to the document. $(document).on("click", "#mutelink_" + this.id, function(){ - if (this.isMuted) + if (this.isAudioMuted) return; this.emitter.emit(UIEvents.REMOTE_AUDIO_MUTED, this.id); @@ -153,7 +152,7 @@ RemoteVideo.prototype._generatePopupContent = function () { */ RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) { - this.isMuted = isMuted; + this.isAudioMuted = isMuted; // generate content, translate it and add it to document only if // popover is visible or we force to do so. diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js index 911c3bc4f..bf3acfce4 100644 --- a/modules/UI/videolayout/SmallVideo.js +++ b/modules/UI/videolayout/SmallVideo.js @@ -7,7 +7,7 @@ import UIEvents from "../../../service/UI/UIEvents"; const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper; function SmallVideo(VideoLayout) { - this.isMuted = false; + this.isAudioMuted = false; this.hasAvatar = false; this.isVideoMuted = false; this.videoStream = null; @@ -204,7 +204,7 @@ SmallVideo.prototype.showAudioIndicator = function(isMuted) { else { audioMutedIndicator.show(); } - this.isMuted = isMuted; + this.isAudioMuted = isMuted; }; /** @@ -222,7 +222,7 @@ SmallVideo.prototype.getAudioMutedIndicator = function () { audioMutedSpan = document.createElement('span'); audioMutedSpan.className = 'audioMuted toolbar-icon'; - + UIUtil.setTooltip(audioMutedSpan, "videothumbnail.mute", "top"); @@ -277,11 +277,11 @@ SmallVideo.prototype.getVideoMutedIndicator = function () { var mutedIndicator = document.createElement('i'); mutedIndicator.className = 'icon-camera-disabled'; - + UIUtil.setTooltip(mutedIndicator, "videothumbnail.videomute", "top"); - + videoMutedSpan.appendChild(mutedIndicator); return $('#' + this.videoSpanId + ' .videoMuted');