feat(external_api) allow initial gUM requests to be disabled
This commit is contained in:
parent
0a5910f0b3
commit
4cb7ebce70
|
@ -472,8 +472,8 @@ export default {
|
||||||
*/
|
*/
|
||||||
createInitialLocalTracks(options = {}) {
|
createInitialLocalTracks(options = {}) {
|
||||||
const errors = {};
|
const errors = {};
|
||||||
const initialDevices = [ 'audio' ];
|
const initialDevices = config.disableInitialGUM ? [] : [ 'audio' ];
|
||||||
const requestedAudio = true;
|
const requestedAudio = !config.disableInitialGUM;
|
||||||
let requestedVideo = false;
|
let requestedVideo = false;
|
||||||
|
|
||||||
// Always get a handle on the audio input device so that we have statistics even if the user joins the
|
// Always get a handle on the audio input device so that we have statistics even if the user joins the
|
||||||
|
@ -484,19 +484,22 @@ export default {
|
||||||
this.muteAudio(true, true);
|
this.muteAudio(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.startWithVideoMuted
|
if (!config.disableInitialGUM
|
||||||
|
&& !options.startWithVideoMuted
|
||||||
&& !options.startAudioOnly
|
&& !options.startAudioOnly
|
||||||
&& !options.startScreenSharing) {
|
&& !options.startScreenSharing) {
|
||||||
initialDevices.push('video');
|
initialDevices.push('video');
|
||||||
requestedVideo = true;
|
requestedVideo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!config.disableInitialGUM) {
|
||||||
JitsiMeetJS.mediaDevices.addEventListener(
|
JitsiMeetJS.mediaDevices.addEventListener(
|
||||||
JitsiMediaDevicesEvents.PERMISSION_PROMPT_IS_SHOWN,
|
JitsiMediaDevicesEvents.PERMISSION_PROMPT_IS_SHOWN,
|
||||||
browserName =>
|
browserName =>
|
||||||
APP.store.dispatch(
|
APP.store.dispatch(
|
||||||
mediaPermissionPromptVisibilityChanged(true, browserName))
|
mediaPermissionPromptVisibilityChanged(true, browserName))
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let tryCreateLocalTracks;
|
let tryCreateLocalTracks;
|
||||||
|
|
||||||
|
|
|
@ -336,6 +336,10 @@ var config = {
|
||||||
// will be joined when no room is specified.
|
// will be joined when no room is specified.
|
||||||
enableWelcomePage: true,
|
enableWelcomePage: true,
|
||||||
|
|
||||||
|
// Disable initial browser getUserMedia requests.
|
||||||
|
// This is useful for scenarios where users might want to start a conference for screensharing only
|
||||||
|
// disableInitialGUM: false,
|
||||||
|
|
||||||
// Enabling the close page will ignore the welcome page redirection when
|
// Enabling the close page will ignore the welcome page redirection when
|
||||||
// a call is hangup.
|
// a call is hangup.
|
||||||
// enableClosePage: false,
|
// enableClosePage: false,
|
||||||
|
|
|
@ -80,6 +80,7 @@ export default [
|
||||||
'disableAP',
|
'disableAP',
|
||||||
'disableAudioLevels',
|
'disableAudioLevels',
|
||||||
'disableDeepLinking',
|
'disableDeepLinking',
|
||||||
|
'disableInitialGUM',
|
||||||
'disableH264',
|
'disableH264',
|
||||||
'disableHPF',
|
'disableHPF',
|
||||||
'disableInviteFunctions',
|
'disableInviteFunctions',
|
||||||
|
|
Loading…
Reference in New Issue