Browse Source

Adds a config param startSilent to disable audio output.

j8
damencho 5 years ago
parent
commit
faee1c139e

+ 7
- 0
conference.js View File

@@ -792,6 +792,13 @@ export default {
792 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 802
                 // XXX The API will take care of disconnecting from the XMPP
796 803
                 // server (and, thus, leaving the room) on unload.
797 804
                 return new Promise((resolve, reject) => {

+ 4
- 0
config.js View File

@@ -90,6 +90,10 @@ var config = {
90 90
     // applied locally. FIXME: having these 2 options is confusing.
91 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 97
     // Video
94 98
 
95 99
     // Sets the preferred resolution (height) for local video. Defaults to 720.

+ 2
- 0
lang/main.json View File

@@ -478,6 +478,8 @@
478 478
         "mutedTitle": "You're muted!",
479 479
         "raisedHand": "__name__ would like to speak.",
480 480
         "somebody": "Somebody",
481
+        "startSilentTitle": "You joined with no audio output!",
482
+        "startSilentDescription": "Rejoin the meeting to enable audio",
481 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 484
         "suboptimalExperienceTitle": "Browser Warning",
483 485
         "newDeviceCameraTitle": "New camera detected",

+ 3
- 1
modules/UI/videolayout/SmallVideo.js View File

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

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

@@ -132,6 +132,7 @@ const WHITELISTED_KEYS = [
132 132
     'startAudioMuted',
133 133
     'startAudioOnly',
134 134
     'startBitrate',
135
+    'startSilent',
135 136
     'startScreenSharing',
136 137
     'startVideoMuted',
137 138
     'startWithAudioMuted',

Loading…
Cancel
Save