Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(settings): add option to mute lobby knocking sounds
nbeck.indy6e32a146e3d8
diff --git a/lang/main.json b/lang/main.jsonindex d5725a5501..7ca77d6ca0 100644--- a/lang/main.json+++ b/lang/main.json@@ -955,6 +955,7 @@"name": "Name","noDevice": "None","participantJoined": "Participant Joined",+ "participantKnocking": "Participant entered lobby","participantLeft": "Participant Left","playSounds": "Play sound on","reactions": "Meeting reactions",diff --git a/react/features/base/settings/reducer.js b/react/features/base/settings/reducer.jsindex 68c91170af..e77c24ce8b 100644--- a/react/features/base/settings/reducer.js+++ b/react/features/base/settings/reducer.js@@ -30,6 +30,7 @@ const DEFAULT_STATE = {hideShareAudioHelper: false,soundsIncomingMessage: true,soundsParticipantJoined: true,+ soundsParticipantKnocking: true,soundsParticipantLeft: true,soundsTalkWhileMuted: true,soundsReactions: true,diff --git a/react/features/lobby/middleware.js b/react/features/lobby/middleware.jsindex c864bc3b5f..c49c183c68 100644--- a/react/features/lobby/middleware.js+++ b/react/features/lobby/middleware.js@@ -96,6 +96,8 @@ StateListenerRegistry.register(});conference.on(JitsiConferenceEvents.LOBBY_USER_JOINED, (id, name) => {+ const { soundsParticipantKnocking } = getState()['features/base/settings'];+batch(() => {dispatch(participantIsKnockingOrUpdated({@@ -103,7 +105,9 @@ StateListenerRegistry.register(name}));- dispatch(playSound(KNOCKING_PARTICIPANT_SOUND_ID));+ if (soundsParticipantKnocking) {+ dispatch(playSound(KNOCKING_PARTICIPANT_SOUND_ID));+ }const isParticipantsPaneVisible = getParticipantsPaneOpen(getState());diff --git a/react/features/settings/actions.js b/react/features/settings/actions.jsindex a49082999c..5def2ac5dc 100644--- a/react/features/settings/actions.js+++ b/react/features/settings/actions.js@@ -191,6 +191,7 @@ export function submitSoundsTab(newState: Object): Function {const shouldNotUpdateReactionSounds = getModeratorTabProps(getState()).startReactionsMuted;const shouldUpdate = (newState.soundsIncomingMessage !== currentState.soundsIncomingMessage)|| (newState.soundsParticipantJoined !== currentState.soundsParticipantJoined)+ || (newState.soundsParticipantKnocking !== currentState.soundsParticipantKnocking)|| (newState.soundsParticipantLeft !== currentState.soundsParticipantLeft)|| (newState.soundsTalkWhileMuted !== currentState.soundsTalkWhileMuted)|| (newState.soundsReactions !== currentState.soundsReactions);@@ -199,6 +200,7 @@ export function submitSoundsTab(newState: Object): Function {const settingsToUpdate = {soundsIncomingMessage: newState.soundsIncomingMessage,soundsParticipantJoined: newState.soundsParticipantJoined,+ soundsParticipantKnocking: newState.soundsParticipantKnocking,soundsParticipantLeft: newState.soundsParticipantLeft,soundsTalkWhileMuted: newState.soundsTalkWhileMuted,soundsReactions: newState.soundsReactionsdiff --git a/react/features/settings/components/web/SoundsTab.js b/react/features/settings/components/web/SoundsTab.jsindex 9b3b26d0c2..6307cd47f6 100644--- a/react/features/settings/components/web/SoundsTab.js+++ b/react/features/settings/components/web/SoundsTab.js@@ -30,6 +30,11 @@ export type Props = {*/soundsParticipantJoined: Boolean,+ /**+ * Whether or not the sound for the participant entering the lobby should play.+ */+ soundsParticipantKnocking: Boolean,+/*** Whether or not the sound for the participant left should play.*/@@ -98,6 +103,7 @@ class SoundsTab extends AbstractDialogTab<Props> {const {soundsIncomingMessage,soundsParticipantJoined,+ soundsParticipantKnocking,soundsParticipantLeft,soundsTalkWhileMuted,soundsReactions,@@ -140,6 +146,11 @@ class SoundsTab extends AbstractDialogTab<Props> {label = { t('settings.talkWhileMuted') }name = 'soundsTalkWhileMuted'onChange = { this._onChange } />+ <Checkbox+ isChecked = { soundsParticipantKnocking }+ label = { t('settings.participantKnocking') }+ name = 'soundsParticipantKnocking'+ onChange = { this._onChange } /></div>);}diff --git a/react/features/settings/functions.js b/react/features/settings/functions.jsindex aed193b119..1cdcd943b7 100644--- a/react/features/settings/functions.js+++ b/react/features/settings/functions.js@@ -230,6 +230,7 @@ export function getSoundsTabProps(stateful: Object | Function) {const {soundsIncomingMessage,soundsParticipantJoined,+ soundsParticipantKnocking,soundsParticipantLeft,soundsTalkWhileMuted,soundsReactions@@ -240,6 +241,7 @@ export function getSoundsTabProps(stateful: Object | Function) {return {soundsIncomingMessage,soundsParticipantJoined,+ soundsParticipantKnocking,soundsParticipantLeft,soundsTalkWhileMuted,soundsReactions,