ref(SmallVideo): rename 'isMuted' to avoid confusion
This commit is contained in:
parent
92641c20f3
commit
2c01fde713
|
@ -19,7 +19,6 @@ function RemoteVideo(id, VideoLayout, emitter) {
|
||||||
this.setDisplayName();
|
this.setDisplayName();
|
||||||
this.flipX = false;
|
this.flipX = false;
|
||||||
this.isLocal = false;
|
this.isLocal = false;
|
||||||
this.isMuted = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteVideo.prototype = Object.create(SmallVideo.prototype);
|
RemoteVideo.prototype = Object.create(SmallVideo.prototype);
|
||||||
|
@ -61,7 +60,7 @@ RemoteVideo.prototype._initPopupMenu = function (popupMenuElement) {
|
||||||
this.popover.show = function () {
|
this.popover.show = function () {
|
||||||
// update content by forcing it, to finish even if popover
|
// update content by forcing it, to finish even if popover
|
||||||
// is not visible
|
// is not visible
|
||||||
this.updateRemoteVideoMenu(this.isMuted, true);
|
this.updateRemoteVideoMenu(this.isAudioMuted, true);
|
||||||
// call the original show, passing its actual this
|
// call the original show, passing its actual this
|
||||||
origShowFunc.call(this.popover);
|
origShowFunc.call(this.popover);
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
@ -97,7 +96,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
||||||
|
|
||||||
muteLinkItem.id = "mutelink_" + this.id;
|
muteLinkItem.id = "mutelink_" + this.id;
|
||||||
|
|
||||||
if (this.isMuted) {
|
if (this.isAudioMuted) {
|
||||||
muteLinkItem.innerHTML = mutedHTML;
|
muteLinkItem.innerHTML = mutedHTML;
|
||||||
muteLinkItem.className = 'mutelink disabled';
|
muteLinkItem.className = 'mutelink disabled';
|
||||||
}
|
}
|
||||||
|
@ -109,7 +108,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
||||||
// Delegate event to the document.
|
// Delegate event to the document.
|
||||||
$(document).on("click", "#mutelink_" + this.id, function(){
|
$(document).on("click", "#mutelink_" + this.id, function(){
|
||||||
|
|
||||||
if (this.isMuted)
|
if (this.isAudioMuted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.emitter.emit(UIEvents.REMOTE_AUDIO_MUTED, this.id);
|
this.emitter.emit(UIEvents.REMOTE_AUDIO_MUTED, this.id);
|
||||||
|
@ -153,7 +152,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
||||||
*/
|
*/
|
||||||
RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
|
RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
|
||||||
|
|
||||||
this.isMuted = isMuted;
|
this.isAudioMuted = isMuted;
|
||||||
|
|
||||||
// generate content, translate it and add it to document only if
|
// generate content, translate it and add it to document only if
|
||||||
// popover is visible or we force to do so.
|
// popover is visible or we force to do so.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import UIEvents from "../../../service/UI/UIEvents";
|
||||||
const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
|
const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
|
||||||
|
|
||||||
function SmallVideo(VideoLayout) {
|
function SmallVideo(VideoLayout) {
|
||||||
this.isMuted = false;
|
this.isAudioMuted = false;
|
||||||
this.hasAvatar = false;
|
this.hasAvatar = false;
|
||||||
this.isVideoMuted = false;
|
this.isVideoMuted = false;
|
||||||
this.videoStream = null;
|
this.videoStream = null;
|
||||||
|
@ -204,7 +204,7 @@ SmallVideo.prototype.showAudioIndicator = function(isMuted) {
|
||||||
else {
|
else {
|
||||||
audioMutedIndicator.show();
|
audioMutedIndicator.show();
|
||||||
}
|
}
|
||||||
this.isMuted = isMuted;
|
this.isAudioMuted = isMuted;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -222,7 +222,7 @@ SmallVideo.prototype.getAudioMutedIndicator = function () {
|
||||||
|
|
||||||
audioMutedSpan = document.createElement('span');
|
audioMutedSpan = document.createElement('span');
|
||||||
audioMutedSpan.className = 'audioMuted toolbar-icon';
|
audioMutedSpan.className = 'audioMuted toolbar-icon';
|
||||||
|
|
||||||
UIUtil.setTooltip(audioMutedSpan,
|
UIUtil.setTooltip(audioMutedSpan,
|
||||||
"videothumbnail.mute",
|
"videothumbnail.mute",
|
||||||
"top");
|
"top");
|
||||||
|
@ -277,11 +277,11 @@ SmallVideo.prototype.getVideoMutedIndicator = function () {
|
||||||
|
|
||||||
var mutedIndicator = document.createElement('i');
|
var mutedIndicator = document.createElement('i');
|
||||||
mutedIndicator.className = 'icon-camera-disabled';
|
mutedIndicator.className = 'icon-camera-disabled';
|
||||||
|
|
||||||
UIUtil.setTooltip(mutedIndicator,
|
UIUtil.setTooltip(mutedIndicator,
|
||||||
"videothumbnail.videomute",
|
"videothumbnail.videomute",
|
||||||
"top");
|
"top");
|
||||||
|
|
||||||
videoMutedSpan.appendChild(mutedIndicator);
|
videoMutedSpan.appendChild(mutedIndicator);
|
||||||
|
|
||||||
return $('#' + this.videoSpanId + ' .videoMuted');
|
return $('#' + this.videoSpanId + ' .videoMuted');
|
||||||
|
|
Loading…
Reference in New Issue