浏览代码

Adds a config param startSilent to disable audio output.

j8
damencho 6 年前
父节点
当前提交
faee1c139e
共有 5 个文件被更改,包括 17 次插入1 次删除
  1. 7
    0
      conference.js
  2. 4
    0
      config.js
  3. 2
    0
      lang/main.json
  4. 3
    1
      modules/UI/videolayout/SmallVideo.js
  5. 1
    0
      react/features/base/config/functions.any.js

+ 7
- 0
conference.js 查看文件

792
                     this.recorder = new Recorder();
792
                     this.recorder = new Recorder();
793
                 }
793
                 }
794
 
794
 
795
+                if (config.startSilent) {
796
+                    APP.store.dispatch(showNotification({
797
+                        descriptionKey: 'notify.startSilentDescription',
798
+                        titleKey: 'notify.startSilentTitle'
799
+                    }));
800
+                }
801
+
795
                 // XXX The API will take care of disconnecting from the XMPP
802
                 // XXX The API will take care of disconnecting from the XMPP
796
                 // server (and, thus, leaving the room) on unload.
803
                 // server (and, thus, leaving the room) on unload.
797
                 return new Promise((resolve, reject) => {
804
                 return new Promise((resolve, reject) => {

+ 4
- 0
config.js 查看文件

90
     // applied locally. FIXME: having these 2 options is confusing.
90
     // applied locally. FIXME: having these 2 options is confusing.
91
     // startWithAudioMuted: false,
91
     // startWithAudioMuted: false,
92
 
92
 
93
+    // Enabling it (with #params) will disable local audio output of remote
94
+    // participants and to enable it back a reload is needed.
95
+    // startSilent: false
96
+
93
     // Video
97
     // Video
94
 
98
 
95
     // Sets the preferred resolution (height) for local video. Defaults to 720.
99
     // Sets the preferred resolution (height) for local video. Defaults to 720.

+ 2
- 0
lang/main.json 查看文件

478
         "mutedTitle": "You're muted!",
478
         "mutedTitle": "You're muted!",
479
         "raisedHand": "__name__ would like to speak.",
479
         "raisedHand": "__name__ would like to speak.",
480
         "somebody": "Somebody",
480
         "somebody": "Somebody",
481
+        "startSilentTitle": "You joined with no audio output!",
482
+        "startSilentDescription": "Rejoin the meeting to enable audio",
481
         "suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>.",
483
         "suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>.",
482
         "suboptimalExperienceTitle": "Browser Warning",
484
         "suboptimalExperienceTitle": "Browser Warning",
483
         "newDeviceCameraTitle": "New camera detected",
485
         "newDeviceCameraTitle": "New camera detected",

+ 3
- 1
modules/UI/videolayout/SmallVideo.js 查看文件

1
-/* global $, APP, interfaceConfig */
1
+/* global $, APP, config, interfaceConfig */
2
 
2
 
3
 /* eslint-disable no-unused-vars */
3
 /* eslint-disable no-unused-vars */
4
 import React from 'react';
4
 import React from 'react';
199
 
199
 
200
     if (isVideo) {
200
     if (isVideo) {
201
         element.setAttribute('muted', 'true');
201
         element.setAttribute('muted', 'true');
202
+    } else if (config.startSilent) {
203
+        element.muted = true;
202
     }
204
     }
203
 
205
 
204
     element.autoplay = true;
206
     element.autoplay = true;

+ 1
- 0
react/features/base/config/functions.any.js 查看文件

132
     'startAudioMuted',
132
     'startAudioMuted',
133
     'startAudioOnly',
133
     'startAudioOnly',
134
     'startBitrate',
134
     'startBitrate',
135
+    'startSilent',
135
     'startScreenSharing',
136
     'startScreenSharing',
136
     'startVideoMuted',
137
     'startVideoMuted',
137
     'startWithAudioMuted',
138
     'startWithAudioMuted',

正在加载...
取消
保存