diff --git a/lang/main.json b/lang/main.json index d5725a550..7ca77d6ca 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.js index 68c91170a..e77c24ce8 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.js index c864bc3b5..c49c183c6 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.js index a49082999..5def2ac5d 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.soundsReactions diff --git a/react/features/settings/components/web/SoundsTab.js b/react/features/settings/components/web/SoundsTab.js index 9b3b26d0c..6307cd47f 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 { const { soundsIncomingMessage, soundsParticipantJoined, + soundsParticipantKnocking, soundsParticipantLeft, soundsTalkWhileMuted, soundsReactions, @@ -140,6 +146,11 @@ class SoundsTab extends AbstractDialogTab { label = { t('settings.talkWhileMuted') } name = 'soundsTalkWhileMuted' onChange = { this._onChange } /> + ); } diff --git a/react/features/settings/functions.js b/react/features/settings/functions.js index aed193b11..1cdcd943b 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,