Browse Source

add option for disabling join/leave sounds (#8596)

* add option for disabling join/leave sounds

* document disableJoinLeaveSounds and add it to whitelist
j8
adam j hartz 4 years ago
parent
commit
67beafc9af
No account linked to committer's email address

+ 4
- 0
config.js View File

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

+ 1
- 0
react/features/base/config/configWhitelist.js View File

@@ -84,6 +84,7 @@ export default [
84 84
     'disableH264',
85 85
     'disableHPF',
86 86
     'disableInviteFunctions',
87
+    'disableJoinLeaveSounds',
87 88
     'disableLocalVideoFlip',
88 89
     'disableNS',
89 90
     'disableProfile',

+ 6
- 1
react/features/base/participants/middleware.js View File

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

Loading…
Cancel
Save