add option for disabling join/leave sounds ()

* add option for disabling join/leave sounds

* document disableJoinLeaveSounds and add it to whitelist
This commit is contained in:
adam j hartz 2021-03-22 12:28:34 -04:00 committed by GitHub
parent 6175a5cad5
commit 67beafc9af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions
config.js
react/features/base

View File

@ -563,6 +563,10 @@ var config = {
// Decides whether the start/stop recording audio notifications should play on record.
// disableRecordAudioNotification: false,
// Disables the sounds that play when other participants join or leave the
// conference (if set to true, these sounds will not be played).
// disableJoinLeaveSounds: false,
// Information for the chrome extension banner
// chromeExtensionBanner: {
// // The chrome extension to be installed address

View File

@ -84,6 +84,7 @@ export default [
'disableH264',
'disableHPF',
'disableInviteFunctions',
'disableJoinLeaveSounds',
'disableLocalVideoFlip',
'disableNS',
'disableProfile',

View File

@ -339,7 +339,12 @@ function _localParticipantLeft({ dispatch }, next, action) {
*/
function _maybePlaySounds({ getState, dispatch }, action) {
const state = getState();
const { startAudioMuted } = state['features/base/config'];
const { startAudioMuted, disableJoinLeaveSounds } = state['features/base/config'];
// If we have join/leave sounds disabled, don't play anything.
if (disableJoinLeaveSounds) {
return;
}
// We're not playing sounds for local participant
// nor when the user is joining past the "startAudioMuted" limit.