Skip to content

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

fix: Hides ask to unmute when participant is audio unmuted.

Дамян Минков3d5f83887068
diff --git a/react/features/video-menu/components/web/ParticipantContextMenu.js b/react/features/video-menu/components/web/ParticipantContextMenu.js
index 054ec2deb5..9aadf686e2 100644
--- a/react/features/video-menu/components/web/ParticipantContextMenu.js
+++ b/react/features/video-menu/components/web/ParticipantContextMenu.js
@@ -13,6 +13,7 @@ import { isIosMobileBrowser, isMobileBrowser } from '../../../base/environment/u
import { IconShareVideo } from '../../../base/icons';
import { MEDIA_TYPE } from '../../../base/media';
import { getLocalParticipant, PARTICIPANT_ROLE } from '../../../base/participants';
+import { isParticipantAudioMuted } from '../../../base/tracks';
import { getBreakoutRooms, getCurrentRoomId, isInBreakoutRoom } from '../../../breakout-rooms/functions';
import { setVolume } from '../../../filmstrip/actions.web';
import { isForceMuted } from '../../../participants-pane/functions';
@@ -133,6 +134,7 @@ const ParticipantContextMenu = ({
isForceMuted(participant, MEDIA_TYPE.AUDIO, state));
const _isVideoForceMuted = useSelector(state =>
isForceMuted(participant, MEDIA_TYPE.VIDEO, state));
+ const _isAudioMuted = useSelector(state => isParticipantAudioMuted(participant, state));
const _overflowDrawer = useSelector(showOverflowDrawer);
const { remoteVideoMenu = {}, disableRemoteMute, startSilent }
= useSelector(state => state['features/base/config']);
@@ -181,7 +183,7 @@ const ParticipantContextMenu = ({
} ];
if (_isModerator) {
- if ((thumbnailMenu || _overflowDrawer) && isModerationSupported) {
+ if ((thumbnailMenu || _overflowDrawer) && isModerationSupported && _isAudioMuted) {
buttons.push(<AskToUnmuteButton
isAudioForceMuted = { _isAudioForceMuted }
isVideoForceMuted = { _isVideoForceMuted }