Adds a config param startSilent to disable audio output.

This commit is contained in:
damencho 2019-06-05 18:01:18 +01:00
parent eb644987ce
commit faee1c139e
5 changed files with 17 additions and 1 deletions

View File

@ -792,6 +792,13 @@ export default {
this.recorder = new Recorder(); this.recorder = new Recorder();
} }
if (config.startSilent) {
APP.store.dispatch(showNotification({
descriptionKey: 'notify.startSilentDescription',
titleKey: 'notify.startSilentTitle'
}));
}
// XXX The API will take care of disconnecting from the XMPP // XXX The API will take care of disconnecting from the XMPP
// server (and, thus, leaving the room) on unload. // server (and, thus, leaving the room) on unload.
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

View File

@ -90,6 +90,10 @@ var config = {
// applied locally. FIXME: having these 2 options is confusing. // applied locally. FIXME: having these 2 options is confusing.
// startWithAudioMuted: false, // startWithAudioMuted: false,
// Enabling it (with #params) will disable local audio output of remote
// participants and to enable it back a reload is needed.
// startSilent: false
// Video // Video
// Sets the preferred resolution (height) for local video. Defaults to 720. // Sets the preferred resolution (height) for local video. Defaults to 720.

View File

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

View File

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

View File

@ -132,6 +132,7 @@ const WHITELISTED_KEYS = [
'startAudioMuted', 'startAudioMuted',
'startAudioOnly', 'startAudioOnly',
'startBitrate', 'startBitrate',
'startSilent',
'startScreenSharing', 'startScreenSharing',
'startVideoMuted', 'startVideoMuted',
'startWithAudioMuted', 'startWithAudioMuted',