fix(av-moderation) Show Mute button when participant is unmuted (#10090)

Show Mute button instead of always showing Ask to Unmute

Added aria-label
This commit is contained in:
robertpin 2021-10-04 14:05:53 +03:00 committed by GitHub
parent 3aec980378
commit eba58ad56b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -57,6 +57,7 @@ export default function ParticipantQuickAction({
case QUICK_ACTION_BUTTON.MUTE: {
return (
<QuickActionButton
aria-label = { `mute-${participantID}` }
onClick = { muteAudio(participantID) }
primary = { true }>
{ muteParticipantButtonText }

View File

@ -235,7 +235,9 @@ function MeetingParticipantItem({
}
const buttonType = _isModerationSupported
? _localModerator ? QUICK_ACTION_BUTTON.ASK_TO_UNMUTE : _quickActionButtonType
? _localModerator && _audioMediaState !== MEDIA_STATE.UNMUTED
? QUICK_ACTION_BUTTON.ASK_TO_UNMUTE
: _quickActionButtonType
: '';
return (

View File

@ -44,10 +44,10 @@ class MuteVideoButton extends AbstractMuteVideoButton {
const { _videoTrackMuted, participantID, t } = this.props;
const muteConfig = _videoTrackMuted ? {
translationKey: 'videothumbnail.videoMuted',
muteClassName: 'mutelink disabled'
muteClassName: 'mutevideolink disabled'
} : {
translationKey: 'videothumbnail.domuteVideo',
muteClassName: 'mutelink'
muteClassName: 'mutevideolink'
};
return (