fix(av-moderation) Fix ask to unmute after allow video

Make Ask to Unmute work if video moderation is on but participant is video whitelisted
This commit is contained in:
robertpin 2021-10-25 13:58:18 +03:00 committed by Дамян Минков
parent 1793bf460e
commit d38bf36b2a
1 changed files with 3 additions and 1 deletions

View File

@ -31,11 +31,13 @@ import { isEnabledFromState } from './functions';
export const approveParticipantAudio = (id: string) => (dispatch: Function, getState: Function) => {
const state = getState();
const { conference } = getConferenceState(state);
const participant = getParticipantById(state, id);
const isAudioModerationOn = isEnabledFromState(MEDIA_TYPE.AUDIO, state);
const isVideoModerationOn = isEnabledFromState(MEDIA_TYPE.VIDEO, state);
const isVideoForceMuted = isForceMuted(participant, MEDIA_TYPE.VIDEO, state);
if (isAudioModerationOn || !isVideoModerationOn) {
if (isAudioModerationOn || !isVideoModerationOn || !isVideoForceMuted) {
conference.avModerationApprove(MEDIA_TYPE.AUDIO, id);
}
};