瀏覽代碼

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 年之前
父節點
當前提交
67beafc9af
No account linked to committer's email address
共有 3 個文件被更改,包括 11 次插入1 次删除
  1. 4
    0
      config.js
  2. 1
    0
      react/features/base/config/configWhitelist.js
  3. 6
    1
      react/features/base/participants/middleware.js

+ 4
- 0
config.js 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存