Skip to content

Commit 1dc8bfa

Browse files
robertpinvp8x8
andauthored
feat(av-moderation) Updated Advanced moderation (jitsi#9875)
Co-authored-by: Vlad Piersec <[email protected]>
1 parent f2e2d52 commit 1dc8bfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1432
-577
lines changed

css/_participants-pane.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
margin: 8px 16px 8px 0;
3030
}
3131

32-
@media (max-width: 375px) {
32+
@media (max-width: 580px) {
3333
.participants_pane {
3434
height: 100vh;
3535
height: -webkit-fill-available;

css/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ $flagsImagePath: "../images/";
9898
@import 'country-picker';
9999
@import 'modals/invite/invite_more';
100100
@import 'modals/security/security';
101+
@import 'modals/mute/mute-dialog';
101102
@import 'e2ee';
102103
@import 'responsive';
103104
@import 'drawer';

css/modals/mute/_mute-dialog.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.mute-dialog {
2+
.separator-line {
3+
margin: 24px 0 24px -20px;
4+
padding: 0 20px;
5+
width: 100%;
6+
height: 1px;
7+
background: #5E6D7A;
8+
}
9+
10+
.control-row {
11+
display: flex;
12+
justify-content: space-between;
13+
margin-top: 15px;
14+
15+
label {
16+
font-size: 14px;
17+
}
18+
}
19+
}

eslint

Whitespace-only changes.

lang/main.json

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@
216216
"embedMeeting": "Embed meeting",
217217
"error": "Error",
218218
"gracefulShutdown": "Our service is currently down for maintenance. Please try again later.",
219-
"grantModeratorDialog": "Are you sure you want to make this participant a moderator?",
220-
"grantModeratorTitle": "Grant moderator",
219+
"grantModeratorDialog": "Are you sure you want to grant moderator rights to {{participantName}}?",
220+
"grantModeratorTitle": "Grant moderator rights",
221221
"hideShareAudioHelper": "Don't show this dialog again",
222222
"IamHost": "I am the host",
223223
"incorrectRoomLockPassword": "Incorrect password",
@@ -247,23 +247,27 @@
247247
"micPermissionDeniedError": "You have not granted permission to use your microphone. You can still join the conference but others won't hear you. Use the camera button in the address bar to fix this.",
248248
"micTimeoutError": "Could not start audio source. Timeout occured!",
249249
"micUnknownError": "Cannot use microphone for an unknown reason.",
250+
"moderationAudioLabel": "Allow attendees to unmute themselves",
251+
"moderationVideoLabel": "Allow attendees to start their video",
250252
"muteEveryoneElseDialog": "Once muted, you won't be able to unmute them, but they can unmute themselves at any time.",
251253
"muteEveryoneElseTitle": "Mute everyone except {{whom}}?",
252-
"muteEveryoneDialog": "Are you sure you want to mute everyone? You won't be able to unmute them, but they can unmute themselves at any time.",
254+
"muteEveryoneDialog": "The participants can unmute themselves at any time.",
255+
"muteEveryoneDialogModerationOn": "The participants can send a request to speak at any time.",
253256
"muteEveryoneTitle": "Mute everyone?",
254257
"muteEveryoneElsesVideoDialog": "Once the camera is disabled, you won't be able to turn it back on, but they can turn it back on at any time.",
255-
"muteEveryoneElsesVideoTitle": "Disable everyone's camera except {{whom}}?",
256-
"muteEveryonesVideoDialog": "Are you sure you want to disable everyone's camera? You won't be able to turn it back on, but they can turn it back on at any time.",
258+
"muteEveryoneElsesVideoTitle": "Stop everyone's video except {{whom}}?",
259+
"muteEveryonesVideoDialog": "The participants can turn on their video at any time.",
260+
"muteEveryonesVideoDialogModerationOn": "The participants can send a request to turn on their video at any time.",
257261
"muteEveryonesVideoDialogOk": "Disable",
258-
"muteEveryonesVideoTitle": "Disable everyone's camera?",
262+
"muteEveryonesVideoTitle": "Stop everyone's video?",
259263
"muteEveryoneSelf": "yourself",
260264
"muteEveryoneStartMuted": "Everyone starts muted from now on",
261265
"muteParticipantBody": "You won't be able to unmute them, but they can unmute themselves at any time.",
262266
"muteParticipantButton": "Mute",
263267
"muteParticipantDialog": "Are you sure you want to mute this participant? You won't be able to unmute them, but they can unmute themselves at any time.",
264268
"muteParticipantsVideoDialog": "Are you sure you want to turn off this participant's camera? You won't be able to turn the camera back on, but they can turn it back on at any time.",
265269
"muteParticipantTitle": "Mute this participant?",
266-
"muteParticipantsVideoButton": "Disable camera",
270+
"muteParticipantsVideoButton": "Stop camera",
267271
"muteParticipantsVideoTitle": "Disable camera of this participant?",
268272
"muteParticipantsVideoBody": "You won't be able to turn the camera back on, but they can turn it back on at any time.",
269273
"noDropboxToken": "No valid Dropbox token",
@@ -542,29 +546,30 @@
542546
"lockRoomPasswordUppercase": "Password",
543547
"me": "me",
544548
"notify": {
549+
"allowAction": "Allow",
550+
"allowedUnmute": "You can unmute your microphone, start your camera or share your screen.",
545551
"connectedOneMember": "{{name}} joined the meeting",
546552
"connectedThreePlusMembers": "{{name}} and many others joined the meeting",
547553
"connectedTwoMembers": "{{first}} and {{second}} joined the meeting",
548554
"disconnected": "disconnected",
549555
"focus": "Conference focus",
550556
"focusFail": "{{component}} not available - retry in {{ms}} sec",
551-
"grantedTo": "Moderator rights granted to {{to}}!",
552-
"hostAskedUnmute": "The host would like you to unmute",
557+
"hostAskedUnmute": "The moderator would like you to speak",
553558
"invitedOneMember": "{{name}} has been invited",
554559
"invitedThreePlusMembers": "{{name}} and {{count}} others have been invited",
555560
"invitedTwoMembers": "{{first}} and {{second}} have been invited",
556561
"kickParticipant": "{{kicked}} was kicked by {{kicker}}",
557562
"me": "Me",
558-
"moderator": "Moderator rights granted!",
563+
"moderator": "You're now a moderator",
559564
"muted": "You have started the conversation muted.",
560565
"mutedTitle": "You're muted!",
561-
"mutedRemotelyTitle": "You have been muted by {{participantDisplayName}}!",
566+
"mutedRemotelyTitle": "You've been muted by the moderator",
562567
"mutedRemotelyDescription": "You can always unmute when you're ready to speak. Mute back when you're done to keep noise away from the meeting.",
563-
"videoMutedRemotelyTitle": "Your camera has been disabled by {{participantDisplayName}}!",
568+
"videoMutedRemotelyTitle": "Your camera has been turned off by the moderator",
564569
"videoMutedRemotelyDescription": "You can always turn it on again.",
565570
"passwordRemovedRemotely": "$t(lockRoomPasswordUppercase) removed by another participant",
566571
"passwordSetRemotely": "$t(lockRoomPasswordUppercase) set by another participant",
567-
"raisedHand": "{{name}} would like to speak.",
572+
"raisedHand": "Would like to speak.",
568573
"screenShareNoAudio": " Share audio box was not checked in the window selection screen.",
569574
"screenShareNoAudioTitle": "Couldn't share system audio!",
570575
"somebody": "Somebody",
@@ -580,12 +585,12 @@
580585
"oldElectronClientDescription1": "You appear to be using an old version of the Jitsi Meet client which has known security vulnerabilities. Please make sure you update to our ",
581586
"oldElectronClientDescription2": "latest build",
582587
"oldElectronClientDescription3": " now!",
583-
"moderationInEffectDescription": "Please raise hand if you want to speak",
584-
"moderationInEffectCSDescription": "Please raise hand if you want to share your video",
585-
"moderationInEffectVideoDescription": "Please raise your hand if you want your video to be visible",
586-
"moderationInEffectTitle": "The microphone is muted by the moderator",
587-
"moderationInEffectCSTitle": "Content sharing is disabled by moderator",
588-
"moderationInEffectVideoTitle": "The video is muted by the moderator",
588+
"moderationInEffectDescription": "Please raise hand if you want to speak.",
589+
"moderationInEffectCSDescription": "Please raise hand if you want to share your screen.",
590+
"moderationInEffectVideoDescription": "Please raise your hand if you want to start your camera.",
591+
"moderationInEffectTitle": "Your microphone is muted by the moderator",
592+
"moderationInEffectCSTitle": "Screen sharing is blocked by the moderator",
593+
"moderationInEffectVideoTitle": "Your camera is blocked by the moderator",
589594
"moderationRequestFromModerator": "The host would like you to unmute",
590595
"moderationRequestFromParticipant": "Wants to speak",
591596
"moderationStartedTitle": "Moderation started",
@@ -605,16 +610,17 @@
605610
},
606611
"actions": {
607612
"allow": "Allow attendees to:",
613+
"audioModeration": "Unmute themselves",
608614
"blockEveryoneMicCamera": "Block everyone's mic and camera",
609615
"invite": "Invite Someone",
610616
"askUnmute": "Ask to unmute",
611617
"mute": "Mute",
612618
"muteAll": "Mute all",
613619
"muteEveryoneElse": "Mute everyone else",
614-
"startModeration": "Unmute themselves or start video",
615620
"stopEveryonesVideo": "Stop everyone's video",
616621
"stopVideo": "Stop video",
617-
"unblockEveryoneMicCamera": "Unblock everyone's mic and camera"
622+
"unblockEveryoneMicCamera": "Unblock everyone's mic and camera",
623+
"videoModeration": "Start video"
618624
}
619625
},
620626
"passwordSetRemotely": "Set by another participant",
@@ -868,7 +874,7 @@
868874
"embedMeeting": "Embed meeting",
869875
"feedback": "Leave feedback",
870876
"fullScreen": "Toggle full screen",
871-
"grantModerator": "Grant Moderator",
877+
"grantModerator": "Grant Moderator Rights",
872878
"hangup": "Leave the meeting",
873879
"help": "Help",
874880
"invite": "Invite people",
@@ -1054,7 +1060,7 @@
10541060
"domuteOthers": "Mute everyone else",
10551061
"domuteVideoOfOthers": "Disable camera of everyone else",
10561062
"flip": "Flip",
1057-
"grantModerator": "Grant Moderator",
1063+
"grantModerator": "Grant Moderator Rights",
10581064
"kick": "Kick out",
10591065
"moderator": "Moderator",
10601066
"mute": "Participant is muted",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"base64-js": "1.3.1",
4848
"bc-css-flags": "3.0.0",
4949
"clipboard-copy": "4.0.1",
50+
"clsx": "1.1.1",
5051
"dropbox": "10.7.0",
5152
"focus-visible": "5.1.0",
5253
"i18n-iso-countries": "6.8.0",

react/features/av-moderation/actionTypes.js

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,40 @@ export const ENABLE_MODERATION = 'ENABLE_MODERATION';
2929

3030

3131
/**
32-
* The type of (redux) action which signals that A/V Moderation disable has been requested.
32+
* The type of (redux) action which signals that Audio Moderation disable has been requested.
3333
*
3434
* {
35-
* type: REQUEST_DISABLE_MODERATION
35+
* type: REQUEST_DISABLE_AUDIO_MODERATION
3636
* }
3737
*/
38-
export const REQUEST_DISABLE_MODERATION = 'REQUEST_DISABLE_MODERATION';
38+
export const REQUEST_DISABLE_AUDIO_MODERATION = 'REQUEST_DISABLE_AUDIO_MODERATION';
3939

4040
/**
41-
* The type of (redux) action which signals that A/V Moderation enable has been requested.
41+
* The type of (redux) action which signals that Video Moderation disable has been requested.
4242
*
4343
* {
44-
* type: REQUEST_ENABLE_MODERATION
44+
* type: REQUEST_DISABLE_VIDEO_MODERATION
4545
* }
4646
*/
47-
export const REQUEST_ENABLE_MODERATION = 'REQUEST_ENABLE_MODERATION';
47+
export const REQUEST_DISABLE_VIDEO_MODERATION = 'REQUEST_DISABLE_VIDEO_MODERATION';
48+
49+
/**
50+
* The type of (redux) action which signals that Audio Moderation enable has been requested.
51+
*
52+
* {
53+
* type: REQUEST_ENABLE_AUDIO_MODERATION
54+
* }
55+
*/
56+
export const REQUEST_ENABLE_AUDIO_MODERATION = 'REQUEST_ENABLE_AUDIO_MODERATION';
57+
58+
/**
59+
* The type of (redux) action which signals that Video Moderation enable has been requested.
60+
*
61+
* {
62+
* type: REQUEST_ENABLE_VIDEO_MODERATION
63+
* }
64+
*/
65+
export const REQUEST_ENABLE_VIDEO_MODERATION = 'REQUEST_ENABLE_VIDEO_MODERATION';
4866

4967
/**
5068
* The type of (redux) action which signals that the local participant had been approved.

react/features/av-moderation/actions.js

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ import {
1111
LOCAL_PARTICIPANT_MODERATION_NOTIFICATION,
1212
PARTICIPANT_APPROVED,
1313
PARTICIPANT_PENDING_AUDIO,
14-
REQUEST_DISABLE_MODERATION,
15-
REQUEST_ENABLE_MODERATION
14+
REQUEST_DISABLE_AUDIO_MODERATION,
15+
REQUEST_ENABLE_AUDIO_MODERATION,
16+
REQUEST_DISABLE_VIDEO_MODERATION,
17+
REQUEST_ENABLE_VIDEO_MODERATION
1618
} from './actionTypes';
19+
import { isEnabledFromState } from './functions';
1720

1821
/**
1922
* Action used by moderator to approve audio and video for a participant.
@@ -22,10 +25,15 @@ import {
2225
* @returns {void}
2326
*/
2427
export const approveParticipant = (id: string) => (dispatch: Function, getState: Function) => {
25-
const { conference } = getConferenceState(getState());
28+
const state = getState();
29+
const { conference } = getConferenceState(state);
2630

27-
conference.avModerationApprove(MEDIA_TYPE.AUDIO, id);
28-
conference.avModerationApprove(MEDIA_TYPE.VIDEO, id);
31+
if (isEnabledFromState(MEDIA_TYPE.AUDIO, state)) {
32+
conference.avModerationApprove(MEDIA_TYPE.AUDIO, id);
33+
}
34+
if (isEnabledFromState(MEDIA_TYPE.VIDEO, state)) {
35+
conference.avModerationApprove(MEDIA_TYPE.VIDEO, id);
36+
}
2937
};
3038

3139
/**
@@ -89,28 +97,54 @@ export const enableModeration = (mediaType: MediaType, actor: Object) => {
8997
};
9098

9199
/**
92-
* Requests disable of audio and video moderation.
100+
* Requests disable of audio moderation.
93101
*
94102
* @returns {{
95-
* type: REQUEST_DISABLE_MODERATED_AUDIO
103+
* type: REQUEST_DISABLE_AUDIO_MODERATION
96104
* }}
97105
*/
98-
export const requestDisableModeration = () => {
106+
export const requestDisableAudioModeration = () => {
99107
return {
100-
type: REQUEST_DISABLE_MODERATION
108+
type: REQUEST_DISABLE_AUDIO_MODERATION
101109
};
102110
};
103111

104112
/**
105-
* Requests enabled audio & video moderation.
113+
* Requests disable of video moderation.
106114
*
107115
* @returns {{
108-
* type: REQUEST_ENABLE_MODERATED_AUDIO
116+
* type: REQUEST_DISABLE_VIDEO_MODERATION
117+
* }}
118+
*/
119+
export const requestDisableVideoModeration = () => {
120+
return {
121+
type: REQUEST_DISABLE_VIDEO_MODERATION
122+
};
123+
};
124+
125+
/**
126+
* Requests enable of audio moderation.
127+
*
128+
* @returns {{
129+
* type: REQUEST_ENABLE_AUDIO_MODERATION
130+
* }}
131+
*/
132+
export const requestEnableAudioModeration = () => {
133+
return {
134+
type: REQUEST_ENABLE_AUDIO_MODERATION
135+
};
136+
};
137+
138+
/**
139+
* Requests enable of video moderation.
140+
*
141+
* @returns {{
142+
* type: REQUEST_ENABLE_VIDEO_MODERATION
109143
* }}
110144
*/
111-
export const requestEnableModeration = () => {
145+
export const requestEnableVideoModeration = () => {
112146
return {
113-
type: REQUEST_ENABLE_MODERATION
147+
type: REQUEST_ENABLE_VIDEO_MODERATION
114148
};
115149
};
116150

react/features/av-moderation/components/AudioModerationNotifications.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)