feat(settings): add option to mute lobby knocking sounds
This commit is contained in:
parent
6f02382472
commit
6e32a146e3
|
@ -955,6 +955,7 @@
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"noDevice": "None",
|
"noDevice": "None",
|
||||||
"participantJoined": "Participant Joined",
|
"participantJoined": "Participant Joined",
|
||||||
|
"participantKnocking": "Participant entered lobby",
|
||||||
"participantLeft": "Participant Left",
|
"participantLeft": "Participant Left",
|
||||||
"playSounds": "Play sound on",
|
"playSounds": "Play sound on",
|
||||||
"reactions": "Meeting reactions",
|
"reactions": "Meeting reactions",
|
||||||
|
|
|
@ -30,6 +30,7 @@ const DEFAULT_STATE = {
|
||||||
hideShareAudioHelper: false,
|
hideShareAudioHelper: false,
|
||||||
soundsIncomingMessage: true,
|
soundsIncomingMessage: true,
|
||||||
soundsParticipantJoined: true,
|
soundsParticipantJoined: true,
|
||||||
|
soundsParticipantKnocking: true,
|
||||||
soundsParticipantLeft: true,
|
soundsParticipantLeft: true,
|
||||||
soundsTalkWhileMuted: true,
|
soundsTalkWhileMuted: true,
|
||||||
soundsReactions: true,
|
soundsReactions: true,
|
||||||
|
|
|
@ -96,6 +96,8 @@ StateListenerRegistry.register(
|
||||||
});
|
});
|
||||||
|
|
||||||
conference.on(JitsiConferenceEvents.LOBBY_USER_JOINED, (id, name) => {
|
conference.on(JitsiConferenceEvents.LOBBY_USER_JOINED, (id, name) => {
|
||||||
|
const { soundsParticipantKnocking } = getState()['features/base/settings'];
|
||||||
|
|
||||||
batch(() => {
|
batch(() => {
|
||||||
dispatch(
|
dispatch(
|
||||||
participantIsKnockingOrUpdated({
|
participantIsKnockingOrUpdated({
|
||||||
|
@ -103,7 +105,9 @@ StateListenerRegistry.register(
|
||||||
name
|
name
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
if (soundsParticipantKnocking) {
|
||||||
dispatch(playSound(KNOCKING_PARTICIPANT_SOUND_ID));
|
dispatch(playSound(KNOCKING_PARTICIPANT_SOUND_ID));
|
||||||
|
}
|
||||||
|
|
||||||
const isParticipantsPaneVisible = getParticipantsPaneOpen(getState());
|
const isParticipantsPaneVisible = getParticipantsPaneOpen(getState());
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,7 @@ export function submitSoundsTab(newState: Object): Function {
|
||||||
const shouldNotUpdateReactionSounds = getModeratorTabProps(getState()).startReactionsMuted;
|
const shouldNotUpdateReactionSounds = getModeratorTabProps(getState()).startReactionsMuted;
|
||||||
const shouldUpdate = (newState.soundsIncomingMessage !== currentState.soundsIncomingMessage)
|
const shouldUpdate = (newState.soundsIncomingMessage !== currentState.soundsIncomingMessage)
|
||||||
|| (newState.soundsParticipantJoined !== currentState.soundsParticipantJoined)
|
|| (newState.soundsParticipantJoined !== currentState.soundsParticipantJoined)
|
||||||
|
|| (newState.soundsParticipantKnocking !== currentState.soundsParticipantKnocking)
|
||||||
|| (newState.soundsParticipantLeft !== currentState.soundsParticipantLeft)
|
|| (newState.soundsParticipantLeft !== currentState.soundsParticipantLeft)
|
||||||
|| (newState.soundsTalkWhileMuted !== currentState.soundsTalkWhileMuted)
|
|| (newState.soundsTalkWhileMuted !== currentState.soundsTalkWhileMuted)
|
||||||
|| (newState.soundsReactions !== currentState.soundsReactions);
|
|| (newState.soundsReactions !== currentState.soundsReactions);
|
||||||
|
@ -199,6 +200,7 @@ export function submitSoundsTab(newState: Object): Function {
|
||||||
const settingsToUpdate = {
|
const settingsToUpdate = {
|
||||||
soundsIncomingMessage: newState.soundsIncomingMessage,
|
soundsIncomingMessage: newState.soundsIncomingMessage,
|
||||||
soundsParticipantJoined: newState.soundsParticipantJoined,
|
soundsParticipantJoined: newState.soundsParticipantJoined,
|
||||||
|
soundsParticipantKnocking: newState.soundsParticipantKnocking,
|
||||||
soundsParticipantLeft: newState.soundsParticipantLeft,
|
soundsParticipantLeft: newState.soundsParticipantLeft,
|
||||||
soundsTalkWhileMuted: newState.soundsTalkWhileMuted,
|
soundsTalkWhileMuted: newState.soundsTalkWhileMuted,
|
||||||
soundsReactions: newState.soundsReactions
|
soundsReactions: newState.soundsReactions
|
||||||
|
|
|
@ -30,6 +30,11 @@ export type Props = {
|
||||||
*/
|
*/
|
||||||
soundsParticipantJoined: Boolean,
|
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.
|
* Whether or not the sound for the participant left should play.
|
||||||
*/
|
*/
|
||||||
|
@ -98,6 +103,7 @@ class SoundsTab extends AbstractDialogTab<Props> {
|
||||||
const {
|
const {
|
||||||
soundsIncomingMessage,
|
soundsIncomingMessage,
|
||||||
soundsParticipantJoined,
|
soundsParticipantJoined,
|
||||||
|
soundsParticipantKnocking,
|
||||||
soundsParticipantLeft,
|
soundsParticipantLeft,
|
||||||
soundsTalkWhileMuted,
|
soundsTalkWhileMuted,
|
||||||
soundsReactions,
|
soundsReactions,
|
||||||
|
@ -140,6 +146,11 @@ class SoundsTab extends AbstractDialogTab<Props> {
|
||||||
label = { t('settings.talkWhileMuted') }
|
label = { t('settings.talkWhileMuted') }
|
||||||
name = 'soundsTalkWhileMuted'
|
name = 'soundsTalkWhileMuted'
|
||||||
onChange = { this._onChange } />
|
onChange = { this._onChange } />
|
||||||
|
<Checkbox
|
||||||
|
isChecked = { soundsParticipantKnocking }
|
||||||
|
label = { t('settings.participantKnocking') }
|
||||||
|
name = 'soundsParticipantKnocking'
|
||||||
|
onChange = { this._onChange } />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,6 +230,7 @@ export function getSoundsTabProps(stateful: Object | Function) {
|
||||||
const {
|
const {
|
||||||
soundsIncomingMessage,
|
soundsIncomingMessage,
|
||||||
soundsParticipantJoined,
|
soundsParticipantJoined,
|
||||||
|
soundsParticipantKnocking,
|
||||||
soundsParticipantLeft,
|
soundsParticipantLeft,
|
||||||
soundsTalkWhileMuted,
|
soundsTalkWhileMuted,
|
||||||
soundsReactions
|
soundsReactions
|
||||||
|
@ -240,6 +241,7 @@ export function getSoundsTabProps(stateful: Object | Function) {
|
||||||
return {
|
return {
|
||||||
soundsIncomingMessage,
|
soundsIncomingMessage,
|
||||||
soundsParticipantJoined,
|
soundsParticipantJoined,
|
||||||
|
soundsParticipantKnocking,
|
||||||
soundsParticipantLeft,
|
soundsParticipantLeft,
|
||||||
soundsTalkWhileMuted,
|
soundsTalkWhileMuted,
|
||||||
soundsReactions,
|
soundsReactions,
|
||||||
|
|
Loading…
Reference in New Issue