fix(moderation) Show Screensharing blocked notification (#13433)

When video moderation is on and the participant tries to share their screen show a notification saying the screen sharing is blocked
pull/13060/head jitsi-meet_8723
Robert Pintilii 2 years ago committed by GitHub
parent e461ec7027
commit d0f9231603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      react/features/av-moderation/middleware.ts
  2. 2
      react/features/base/tracks/actions.web.ts

@ -48,6 +48,7 @@ import {
ASKED_TO_UNMUTE_NOTIFICATION_ID,
ASKED_TO_UNMUTE_SOUND_ID,
AUDIO_MODERATION_NOTIFICATION_ID,
CS_MODERATION_NOTIFICATION_ID,
VIDEO_MODERATION_NOTIFICATION_ID
} from './constants';
import {
@ -88,6 +89,11 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
uid = VIDEO_MODERATION_NOTIFICATION_ID;
break;
}
case MEDIA_TYPE.SCREENSHARE: {
titleKey = 'notify.moderationInEffectCSTitle';
uid = CS_MODERATION_NOTIFICATION_ID;
break;
}
}
dispatch(showNotification({

@ -1,6 +1,7 @@
// @ts-expect-error
import { AUDIO_ONLY_SCREEN_SHARE_NO_TRACK } from '../../../../modules/UI/UIErrors';
import { IReduxState, IStore } from '../../app/types';
import { showModeratedNotification } from '../../av-moderation/actions';
import { shouldShowModeratedNotification } from '../../av-moderation/functions';
import { setNoiseSuppressionEnabled } from '../../noise-suppression/actions';
import { showNotification } from '../../notifications/actions';
@ -44,6 +45,7 @@ export function toggleScreensharing(
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
// check for A/V Moderation when trying to start screen sharing
if ((enabled || enabled === undefined) && shouldShowModeratedNotification(MEDIA_TYPE.VIDEO, getState())) {
dispatch(showModeratedNotification(MEDIA_TYPE.SCREENSHARE));
return Promise.reject();
}

Loading…
Cancel
Save