Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes a problem not showing remote video menu in case of all moderators. (#2130)

Дамян Минков90070d9e9fa3
diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js
index bda63aba14..36f0db7fb9 100644
--- a/modules/UI/videolayout/RemoteVideo.js
+++ b/modules/UI/videolayout/RemoteVideo.js
@@ -41,7 +41,6 @@ function RemoteVideo(user, VideoLayout, emitter) {
this.videoSpanId = `participant_${this.id}`;
SmallVideo.call(this, VideoLayout);
this._audioStreamElement = null;
- this.hasRemoteVideoMenu = false;
this._supportsRemoteControl = false;
this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP
? 'left bottom' : 'top center';
@@ -298,9 +297,11 @@ RemoteVideo.prototype._setAudioVolume = function(newVal) {
*
* @param isMuted the new muted state to update to
*/
-RemoteVideo.prototype.updateRemoteVideoMenu = function(
- isMuted = this.isAudioMuted) {
- this.isAudioMuted = isMuted;
+RemoteVideo.prototype.updateRemoteVideoMenu = function(isMuted) {
+
+ if (typeof isMuted !== 'undefined') {
+ this.isAudioMuted = isMuted;
+ }
this._generatePopupContent();
};
@@ -343,8 +344,6 @@ RemoteVideo.prototype.addRemoteVideoMenu = function() {
}
this._generatePopupContent();
-
- this.hasRemoteVideoMenu = true;
};
/**
@@ -641,7 +640,6 @@ RemoteVideo.prototype.removeRemoteVideoMenu = function() {
if (menuSpan.length) {
ReactDOM.unmountComponentAtNode(menuSpan.get(0));
menuSpan.remove();
- this.hasRemoteVideoMenu = false;
}
};
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js
index e14fce1294..84542a5854 100644
--- a/modules/UI/videolayout/VideoLayout.js
+++ b/modules/UI/videolayout/VideoLayout.js
@@ -559,12 +559,7 @@ const VideoLayout = {
remoteVideo.addModeratorIndicator();
}
- if (isModerator) {
- // We are moderator, but user is not - add menu
- if (!remoteVideo.hasRemoteVideoMenu) {
- remoteVideo.addRemoteVideoMenu();
- }
- }
+ remoteVideo.updateRemoteVideoMenu();
});
},