|
@@ -2,152 +2,14 @@
|
2
|
2
|
|
3
|
3
|
import _ from 'lodash';
|
4
|
4
|
|
|
5
|
+import CONFIG_WHITELIST from './configWhitelist';
|
5
|
6
|
import { _CONFIG_STORE_PREFIX } from './constants';
|
|
7
|
+import INTERFACE_CONFIG_WHITELIST from './interfaceConfigWhitelist';
|
6
|
8
|
import parseURLParams from './parseURLParams';
|
7
|
9
|
import logger from './logger';
|
8
|
10
|
|
9
|
11
|
declare var $: Object;
|
10
|
12
|
|
11
|
|
-/**
|
12
|
|
- * The config keys to whitelist, the keys that can be overridden.
|
13
|
|
- * Currently we can only whitelist the first part of the properties, like
|
14
|
|
- * 'p2p.useStunTurn' and 'p2p.enabled' we whitelist all p2p options.
|
15
|
|
- * The whitelist is used only for config.js.
|
16
|
|
- *
|
17
|
|
- * @private
|
18
|
|
- * @type Array
|
19
|
|
- */
|
20
|
|
-const WHITELISTED_KEYS = [
|
21
|
|
- '_desktopSharingSourceDevice',
|
22
|
|
- '_peerConnStatusOutOfLastNTimeout',
|
23
|
|
- '_peerConnStatusRtcMuteTimeout',
|
24
|
|
- 'abTesting',
|
25
|
|
- 'analytics.disabled',
|
26
|
|
- 'autoRecord',
|
27
|
|
- 'autoRecordToken',
|
28
|
|
- 'avgRtpStatsN',
|
29
|
|
- 'callFlowsEnabled',
|
30
|
|
- 'callStatsConfIDNamespace',
|
31
|
|
- 'callStatsID',
|
32
|
|
- 'callStatsSecret',
|
33
|
|
-
|
34
|
|
- /**
|
35
|
|
- * The display name of the CallKit call representing the conference/meeting
|
36
|
|
- * associated with this config.js including while the call is ongoing in the
|
37
|
|
- * UI presented by CallKit and in the system-wide call history. The property
|
38
|
|
- * is meant for use cases in which the room name is not desirable as a
|
39
|
|
- * display name for CallKit purposes and the desired display name is not
|
40
|
|
- * provided in the form of a JWT callee. As the value is associated with a
|
41
|
|
- * conference/meeting, the value makes sense not as a deployment-wide
|
42
|
|
- * configuration, only as a runtime configuration override/overwrite
|
43
|
|
- * provided by, for example, Jitsi Meet SDK for iOS.
|
44
|
|
- *
|
45
|
|
- * @type string
|
46
|
|
- */
|
47
|
|
- 'callDisplayName',
|
48
|
|
-
|
49
|
|
- /**
|
50
|
|
- * The handle
|
51
|
|
- * ({@link https://developer.apple.com/documentation/callkit/cxhandle}) of
|
52
|
|
- * the CallKit call representing the conference/meeting associated with this
|
53
|
|
- * config.js. The property is meant for use cases in which the room URL is
|
54
|
|
- * not desirable as the handle for CallKit purposes. As the value is
|
55
|
|
- * associated with a conference/meeting, the value makes sense not as a
|
56
|
|
- * deployment-wide configuration, only as a runtime configuration
|
57
|
|
- * override/overwrite provided by, for example, Jitsi Meet SDK for iOS.
|
58
|
|
- *
|
59
|
|
- * @type string
|
60
|
|
- */
|
61
|
|
- 'callHandle',
|
62
|
|
-
|
63
|
|
- /**
|
64
|
|
- * The UUID of the CallKit call representing the conference/meeting
|
65
|
|
- * associated with this config.js. The property is meant for use cases in
|
66
|
|
- * which Jitsi Meet is to work with a CallKit call created outside of Jitsi
|
67
|
|
- * Meet and to be adopted by Jitsi Meet such as, for example, an incoming
|
68
|
|
- * and/or outgoing CallKit call created by Jitsi Meet SDK for iOS
|
69
|
|
- * clients/consumers prior to giving control to Jitsi Meet. As the value is
|
70
|
|
- * associated with a conference/meeting, the value makes sense not as a
|
71
|
|
- * deployment-wide configuration, only as a runtime configuration
|
72
|
|
- * override/overwrite provided by, for example, Jitsi Meet SDK for iOS.
|
73
|
|
- *
|
74
|
|
- * @type string
|
75
|
|
- */
|
76
|
|
- 'callUUID',
|
77
|
|
-
|
78
|
|
- 'channelLastN',
|
79
|
|
- 'constraints',
|
80
|
|
- 'debug',
|
81
|
|
- 'debugAudioLevels',
|
82
|
|
- 'defaultLanguage',
|
83
|
|
- 'desktopSharingChromeDisabled',
|
84
|
|
- 'desktopSharingChromeExtId',
|
85
|
|
- 'desktopSharingChromeMinExtVersion',
|
86
|
|
- 'desktopSharingChromeSources',
|
87
|
|
- 'desktopSharingFrameRate',
|
88
|
|
- 'desktopSharingFirefoxDisabled',
|
89
|
|
- 'desktopSharingSources',
|
90
|
|
- 'disable1On1Mode',
|
91
|
|
- 'disableAEC',
|
92
|
|
- 'disableAGC',
|
93
|
|
- 'disableAP',
|
94
|
|
- 'disableAudioLevels',
|
95
|
|
- 'disableDeepLinking',
|
96
|
|
- 'disableH264',
|
97
|
|
- 'disableHPF',
|
98
|
|
- 'disableNS',
|
99
|
|
- 'disableRemoteControl',
|
100
|
|
- 'disableRtx',
|
101
|
|
- 'disableSuspendVideo',
|
102
|
|
- 'displayJids',
|
103
|
|
- 'e2eping',
|
104
|
|
- 'enableDisplayNameInStats',
|
105
|
|
- 'enableLayerSuspension',
|
106
|
|
- 'enableLipSync',
|
107
|
|
- 'disableLocalVideoFlip',
|
108
|
|
- 'enableRemb',
|
109
|
|
- 'enableStatsID',
|
110
|
|
- 'enableTalkWhileMuted',
|
111
|
|
- 'enableTcc',
|
112
|
|
- 'etherpad_base',
|
113
|
|
- 'failICE',
|
114
|
|
- 'fileRecordingsEnabled',
|
115
|
|
- 'firefox_fake_device',
|
116
|
|
- 'forceJVB121Ratio',
|
117
|
|
- 'gatherStats',
|
118
|
|
- 'googleApiApplicationClientID',
|
119
|
|
- 'hiddenDomain',
|
120
|
|
- 'hosts',
|
121
|
|
- 'iAmRecorder',
|
122
|
|
- 'iAmSipGateway',
|
123
|
|
- 'iceTransportPolicy',
|
124
|
|
- 'ignoreStartMuted',
|
125
|
|
- 'liveStreamingEnabled',
|
126
|
|
- 'localRecording',
|
127
|
|
- 'minParticipants',
|
128
|
|
- 'nick',
|
129
|
|
- 'openBridgeChannel',
|
130
|
|
- 'p2p',
|
131
|
|
- 'preferH264',
|
132
|
|
- 'requireDisplayName',
|
133
|
|
- 'resolution',
|
134
|
|
- 'startAudioMuted',
|
135
|
|
- 'startAudioOnly',
|
136
|
|
- 'startBitrate',
|
137
|
|
- 'startSilent',
|
138
|
|
- 'startScreenSharing',
|
139
|
|
- 'startVideoMuted',
|
140
|
|
- 'startWithAudioMuted',
|
141
|
|
- 'startWithVideoMuted',
|
142
|
|
- 'subject',
|
143
|
|
- 'testing',
|
144
|
|
- 'useIPv6',
|
145
|
|
- 'useNicks',
|
146
|
|
- 'useStunTurn',
|
147
|
|
- 'webrtcIceTcpDisable',
|
148
|
|
- 'webrtcIceUdpDisable'
|
149
|
|
-];
|
150
|
|
-
|
151
|
13
|
// XXX The functions getRoomName and parseURLParams are split out of
|
152
|
14
|
// functions.js because they are bundled in both app.bundle and
|
153
|
15
|
// do_external_connect, webpack 1 does not support tree shaking, and we don't
|
|
@@ -306,8 +168,8 @@ export function overrideConfigJSON(
|
306
|
168
|
/* eslint-enable max-params, no-shadow */
|
307
|
169
|
|
308
|
170
|
/**
|
309
|
|
- * Whitelist only config.js, skips this for others configs
|
310
|
|
- * (interfaceConfig, loggingConfig).
|
|
171
|
+ * Apply whitelist filtering for configs with whitelists, skips this for others
|
|
172
|
+ * configs (loggingConfig).
|
311
|
173
|
* Only extracts overridden values for keys we allow to be overridden.
|
312
|
174
|
*
|
313
|
175
|
* @param {string} configName - The config name, one of config,
|
|
@@ -318,11 +180,13 @@ export function overrideConfigJSON(
|
318
|
180
|
* that are whitelisted.
|
319
|
181
|
*/
|
320
|
182
|
function _getWhitelistedJSON(configName, configJSON) {
|
321
|
|
- if (configName !== 'config') {
|
322
|
|
- return configJSON;
|
|
183
|
+ if (configName === 'interfaceConfig') {
|
|
184
|
+ return _.pick(configJSON, INTERFACE_CONFIG_WHITELIST);
|
|
185
|
+ } else if (configName === 'config') {
|
|
186
|
+ return _.pick(configJSON, CONFIG_WHITELIST);
|
323
|
187
|
}
|
324
|
188
|
|
325
|
|
- return _.pick(configJSON, WHITELISTED_KEYS);
|
|
189
|
+ return configJSON;
|
326
|
190
|
}
|
327
|
191
|
|
328
|
192
|
/**
|