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:
parent
1793bf460e
commit
d38bf36b2a
|
@ -31,11 +31,13 @@ import { isEnabledFromState } from './functions';
|
||||||
export const approveParticipantAudio = (id: string) => (dispatch: Function, getState: Function) => {
|
export const approveParticipantAudio = (id: string) => (dispatch: Function, getState: Function) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { conference } = getConferenceState(state);
|
const { conference } = getConferenceState(state);
|
||||||
|
const participant = getParticipantById(state, id);
|
||||||
|
|
||||||
const isAudioModerationOn = isEnabledFromState(MEDIA_TYPE.AUDIO, state);
|
const isAudioModerationOn = isEnabledFromState(MEDIA_TYPE.AUDIO, state);
|
||||||
const isVideoModerationOn = isEnabledFromState(MEDIA_TYPE.VIDEO, 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);
|
conference.avModerationApprove(MEDIA_TYPE.AUDIO, id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue