Explorar el Código

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 hace 4 años
padre
commit
67beafc9af
No account linked to committer's email address

+ 4
- 0
config.js Ver fichero

563
     // Decides whether the start/stop recording audio notifications should play on record.
563
     // Decides whether the start/stop recording audio notifications should play on record.
564
     // disableRecordAudioNotification: false,
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
     // Information for the chrome extension banner
570
     // Information for the chrome extension banner
567
     // chromeExtensionBanner: {
571
     // chromeExtensionBanner: {
568
     //     // The chrome extension to be installed address
572
     //     // The chrome extension to be installed address

+ 1
- 0
react/features/base/config/configWhitelist.js Ver fichero

84
     'disableH264',
84
     'disableH264',
85
     'disableHPF',
85
     'disableHPF',
86
     'disableInviteFunctions',
86
     'disableInviteFunctions',
87
+    'disableJoinLeaveSounds',
87
     'disableLocalVideoFlip',
88
     'disableLocalVideoFlip',
88
     'disableNS',
89
     'disableNS',
89
     'disableProfile',
90
     'disableProfile',

+ 6
- 1
react/features/base/participants/middleware.js Ver fichero

339
  */
339
  */
340
 function _maybePlaySounds({ getState, dispatch }, action) {
340
 function _maybePlaySounds({ getState, dispatch }, action) {
341
     const state = getState();
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
     // We're not playing sounds for local participant
349
     // We're not playing sounds for local participant
345
     // nor when the user is joining past the "startAudioMuted" limit.
350
     // nor when the user is joining past the "startAudioMuted" limit.

Loading…
Cancelar
Guardar