Skip to content

Commit 1dbe5cd

Browse files
committed
web: cleanup config
Remove no longer necessary checks since we build the whole config from scratch. Drop no longer valid options: - Callstats - useIPv6 - External connect
1 parent 3a888fd commit 1dbe5cd

File tree

3 files changed

+95
-107
lines changed

3 files changed

+95
-107
lines changed

docker-compose.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ services:
2020
- AUTO_CAPTION_ON_RECORD
2121
- BRANDING_DATA_URL
2222
- BOSH_RELATIVE
23-
- CALLSTATS_CUSTOM_SCRIPT_URL
24-
- CALLSTATS_ID
25-
- CALLSTATS_SECRET
2623
- CHROME_EXTENSION_BANNER_JSON
2724
- COLIBRI_WEBSOCKET_PORT
2825
- COLIBRI_WEBSOCKET_JVB_LOOKUP_NAME
2926
- COLIBRI_WEBSOCKET_REGEX
3027
- CONFCODE_URL
31-
- CONFIG_EXTERNAL_CONNECT
3228
- DEFAULT_LANGUAGE
3329
- DEPLOYMENTINFO_ENVIRONMENT
3430
- DEPLOYMENTINFO_ENVIRONMENT_TYPE

web/rootfs/defaults/settings-config.js

Lines changed: 90 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}}
44
{{ $ENABLE_CALENDAR := .Env.ENABLE_CALENDAR | default "false" | toBool -}}
55
{{ $ENABLE_FILE_RECORDING_SHARING := .Env.ENABLE_FILE_RECORDING_SHARING | default "false" | toBool -}}
6-
{{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}}
76
{{ $ENABLE_NO_AUDIO_DETECTION := .Env.ENABLE_NO_AUDIO_DETECTION | default "true" | toBool -}}
87
{{ $ENABLE_P2P := .Env.ENABLE_P2P | default "true" | toBool -}}
98
{{ $ENABLE_PREJOIN_PAGE := .Env.ENABLE_PREJOIN_PAGE | default "true" | toBool -}}
@@ -19,7 +18,6 @@
1918
{{ $ENABLE_REMB := .Env.ENABLE_REMB | default "true" | toBool -}}
2019
{{ $ENABLE_REQUIRE_DISPLAY_NAME := .Env.ENABLE_REQUIRE_DISPLAY_NAME | default "false" | toBool -}}
2120
{{ $ENABLE_SIMULCAST := .Env.ENABLE_SIMULCAST | default "true" | toBool -}}
22-
{{ $ENABLE_STATS_ID := .Env.ENABLE_STATS_ID | default "false" | toBool -}}
2321
{{ $ENABLE_STEREO := .Env.ENABLE_STEREO | default "false" | toBool -}}
2422
{{ $ENABLE_OPUS_RED := .Env.ENABLE_OPUS_RED | default "false" | toBool -}}
2523
{{ $ENABLE_TALK_WHILE_MUTED := .Env.ENABLE_TALK_WHILE_MUTED | default "false" | toBool -}}
@@ -72,12 +70,13 @@
7270
// Video configuration.
7371
//
7472

75-
if (!config.hasOwnProperty('constraints')) config.constraints = {};
76-
if (!config.constraints.hasOwnProperty('video')) config.constraints.video = {};
77-
7873
config.resolution = {{ $RESOLUTION }};
79-
config.constraints.video.height = { ideal: {{ $RESOLUTION }}, max: {{ $RESOLUTION }}, min: {{ $RESOLUTION_MIN }} };
80-
config.constraints.video.width = { ideal: {{ $RESOLUTION_WIDTH }}, max: {{ $RESOLUTION_WIDTH }}, min: {{ $RESOLUTION_WIDTH_MIN }}};
74+
config.constraints = {
75+
video: {
76+
height: { ideal: {{ $RESOLUTION }}, max: {{ $RESOLUTION }}, min: {{ $RESOLUTION_MIN }} },
77+
width: { ideal: {{ $RESOLUTION_WIDTH }}, max: {{ $RESOLUTION_WIDTH }}, min: {{ $RESOLUTION_WIDTH_MIN }}},
78+
}
79+
};
8180

8281
{{ if not $ENABLE_SIMULCAST -}}
8382
config.disableSimulcast = true;
@@ -89,17 +88,22 @@ config.startWithVideoMuted = {{ $START_WITH_VIDEO_MUTED }};
8988
config.startBitrate = '{{ .Env.START_BITRATE }}';
9089
{{ end -}}
9190

92-
if (!config.hasOwnProperty('flags')) config.flags = {};
93-
config.flags.sourceNameSignaling = true;
94-
config.flags.sendMultipleVideoStreams = true;
95-
config.flags.receiveMultipleVideoStreams = true;
91+
config.flags = {
92+
sourceNameSignaling: true
93+
sendMultipleVideoStreams: true,
94+
receiveMultipleVideoStreams: true
95+
};
96+
9697

97-
{{ if not $DESKTOP_SHARING_FRAMERATE_AUTO }}
9898
// ScreenShare Configuration.
9999
//
100100

101-
config.desktopSharingFrameRate = { min: {{ $DESKTOP_SHARING_FRAMERATE_MIN }}, max: {{ $DESKTOP_SHARING_FRAMERATE_MAX }} };
102-
{{ end }}
101+
{{ if not $DESKTOP_SHARING_FRAMERATE_AUTO -}}
102+
config.desktopSharingFrameRate = {
103+
min: {{ $DESKTOP_SHARING_FRAMERATE_MIN }},
104+
max: {{ $DESKTOP_SHARING_FRAMERATE_MAX }}
105+
};
106+
{{ end -}}
103107

104108
// Audio configuration.
105109
//
@@ -108,8 +112,9 @@ config.enableNoAudioDetection = {{ $ENABLE_NO_AUDIO_DETECTION }};
108112
config.enableTalkWhileMuted = {{ $ENABLE_TALK_WHILE_MUTED }};
109113
config.disableAP = {{ not $ENABLE_AUDIO_PROCESSING }};
110114

111-
if (!config.hasOwnProperty('audioQuality')) config.audioQuality = {};
112-
config.audioQuality.stereo = {{ $ENABLE_STEREO }};
115+
config.audioQuality = {
116+
stereo: {{ $ENABLE_STEREO }}
117+
};
113118

114119
{{ if .Env.AUDIO_QUALITY_OPUS_BITRATE -}}
115120
config.audioQuality.opusMaxAverageBitrate = '{{ .Env.AUDIO_QUALITY_OPUS_BITRATE }}';
@@ -120,18 +125,16 @@ config.startAudioMuted = {{ $START_AUDIO_MUTED }};
120125
config.startWithAudioMuted = {{ $START_WITH_AUDIO_MUTED }};
121126
config.startSilent = {{ $START_SILENT }};
122127
config.enableOpusRed = {{ $ENABLE_OPUS_RED }};
123-
{{ if $DISABLE_AUDIO_LEVELS -}}
124-
config.disableAudioLevels = true;
125-
{{ end -}}
128+
config.disableAudioLevels = {{ $DISABLE_AUDIO_LEVELS }};
126129
config.enableNoisyMicDetection = {{ $ENABLE_NOISY_MIC_DETECTION }};
127130

128131

129132
// Peer-to-Peer options.
130133
//
131134

132-
if (!config.hasOwnProperty('p2p')) config.p2p = {};
133-
134-
config.p2p.enabled = {{ $ENABLE_P2P }};
135+
config.p2p = {
136+
enabled: {{ $ENABLE_P2P }}
137+
};
135138

136139

137140
// Breakout Rooms
@@ -157,49 +160,54 @@ config.etherpad_base = '{{ $PUBLIC_URL }}/etherpad/p/';
157160

158161
config.hiddenDomain = '{{ $XMPP_RECORDER_DOMAIN }}';
159162

160-
if (!config.hasOwnProperty('recordingService')) config.recordingService = {};
161-
162-
// Whether to enable file recording or not using the "service" defined by the finalizer in Jibri
163-
config.recordingService.enabled = {{ $ENABLE_SERVICE_RECORDING }};
163+
config.recordingService = {
164+
// Whether to enable file recording or not using the "service" defined by the finalizer in Jibri
165+
enabled: {{ $ENABLE_SERVICE_RECORDING }},
164166

165-
// Whether to show the possibility to share file recording with other people
166-
// (e.g. meeting participants), based on the actual implementation
167-
// on the backend.
168-
config.recordingService.sharingEnabled = {{ $ENABLE_FILE_RECORDING_SHARING }};
167+
// Whether to show the possibility to share file recording with other people
168+
// (e.g. meeting participants), based on the actual implementation
169+
// on the backend.
170+
sharingEnabled: {{ $ENABLE_FILE_RECORDING_SHARING }}
171+
};
169172

170173
// Live streaming configuration.
171-
if (!config.hasOwnProperty('liveStreaming')) config.liveStreaming = {};
172-
config.liveStreaming.enabled = {{ $ENABLE_LIVESTREAMING }};
173-
config.liveStreaming.dataPrivacyLink= '{{ $ENABLE_LIVESTREAMING_DATA_PRIVACY_LINK }}';
174-
config.liveStreaming.helpLink= '{{ $ENABLE_LIVESTREAMING_HELP_LINK }}';
175-
config.liveStreaming.termsLink= '{{ $ENABLE_LIVESTREAMING_TERMS_LINK }}';
176-
config.liveStreaming.validatorRegExpString= '{{ $ENABLE_LIVESTREAMING_VALIDATOR_REGEXP_STRING }}';
174+
config.liveStreaming = {
175+
enabled: {{ $ENABLE_LIVESTREAMING }},
176+
dataPrivacyLink: '{{ $ENABLE_LIVESTREAMING_DATA_PRIVACY_LINK }}',
177+
helpLink: '{{ $ENABLE_LIVESTREAMING_HELP_LINK }}',
178+
termsLink: '{{ $ENABLE_LIVESTREAMING_TERMS_LINK }}',
179+
validatorRegExpString: '{{ $ENABLE_LIVESTREAMING_VALIDATOR_REGEXP_STRING }}'
180+
};
181+
177182

178183
{{ if .Env.DROPBOX_APPKEY -}}
179184
// Enable the dropbox integration.
180-
if (!config.hasOwnProperty('dropbox')) config.dropbox = {};
181-
config.dropbox.appKey = '{{ .Env.DROPBOX_APPKEY }}';
185+
config.dropbox = {
186+
appKey = '{{ .Env.DROPBOX_APPKEY }}'
187+
};
188+
182189
{{ if .Env.DROPBOX_REDIRECT_URI -}}
183190
// A URL to redirect the user to, after authenticating
184191
// by default uses:
185192
// 'https://jitsi-meet.example.com/static/oauth.html'
186193
config.dropbox.redirectURI = '{{ .Env.DROPBOX_REDIRECT_URI }}';
187194
{{ end -}}
188195
{{ end -}}
189-
{{ end -}}
190196

197+
{{ end -}}
191198

192199
// Local recording configuration.
193-
if (!config.hasOwnProperty('localRecording')) config.localRecording = {};
194-
config.localRecording.disable = {{ $DISABLE_LOCAL_RECORDING }};
195-
config.localRecording.notifyAllParticipants = {{ $ENABLE_LOCAL_RECORDING_NOTIFY_ALL_PARTICIPANT }};
196-
config.localRecording.disableSelfRecording = {{ $ENABLE_LOCAL_RECORDING_SELF_START }};
200+
config.localRecording = {
201+
disable: {{ $DISABLE_LOCAL_RECORDING }},
202+
notifyAllParticipants: {{ $ENABLE_LOCAL_RECORDING_NOTIFY_ALL_PARTICIPANT }},
203+
disableSelfRecording: {{ $ENABLE_LOCAL_RECORDING_SELF_START }}
204+
};
197205

198206

199207
// Analytics.
200208
//
201209

202-
if (!config.hasOwnProperty('analytics')) config.analytics = {};
210+
config.analytics = {};
203211

204212
{{ if .Env.AMPLITUDE_ID -}}
205213
// The Amplitude APP Key:
@@ -230,24 +238,6 @@ config.analytics.scriptURLs = [ '{{ join "','" (splitList "," .Env.ANALYTICS_SCR
230238
config.analytics.whiteListedEvents = [ '{{ join "','" (splitList "," .Env.ANALYTICS_WHITELISTED_EVENTS) }}' ];
231239
{{ end -}}
232240

233-
{{ if .Env.CALLSTATS_CUSTOM_SCRIPT_URL -}}
234-
config.callStatsCustomScriptUrl = '{{ .Env.CALLSTATS_CUSTOM_SCRIPT_URL }}';
235-
{{ end -}}
236-
237-
{{ if .Env.CALLSTATS_ID -}}
238-
// To enable sending statistics to callstats.io you must provide the
239-
// Application ID and Secret.
240-
config.callStatsID = '{{ .Env.CALLSTATS_ID }}';
241-
{{ end -}}
242-
243-
{{ if .Env.CALLSTATS_ID -}}
244-
config.callStatsSecret = '{{ .Env.CALLSTATS_SECRET }}';
245-
{{ end -}}
246-
247-
// Enables callstatsUsername to be reported as statsId and used
248-
// by callstats as repoted remote id.
249-
config.enableStatsID = {{ $ENABLE_STATS_ID }};
250-
251241

252242
// Dial in/out services.
253243
//
@@ -304,19 +294,22 @@ config.peopleSearchQueryTypes = ['user','conferenceRooms'];
304294
//
305295

306296
// Prejoin page.
307-
if (!config.hasOwnProperty('prejoinConfig')) config.prejoinConfig = {};
308-
config.prejoinConfig.enabled = {{ $ENABLE_PREJOIN_PAGE }};
297+
config.prejoinConfig = {
298+
enabled: {{ $ENABLE_PREJOIN_PAGE }},
309299

310-
// Hides the participant name editing field in the prejoin screen.
311-
config.prejoinConfig.hideDisplayName = {{ $HIDE_PREJOIN_DISPLAY_NAME }};
300+
// Hides the participant name editing field in the prejoin screen.
301+
hideDisplayName: {{ $HIDE_PREJOIN_DISPLAY_NAME }}
302+
};
312303

313304
// List of buttons to hide from the extra join options dropdown on prejoin screen.
314305
{{ if .Env.HIDE_PREJOIN_EXTRA_BUTTONS -}}
315306
config.prejoinConfig.hideExtraJoinButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREJOIN_EXTRA_BUTTONS) }}' ];
316307
{{ end -}}
317308

318309
// Welcome page.
319-
config.enableWelcomePage = {{ $ENABLE_WELCOME_PAGE }};
310+
config.welcomePage = {
311+
disabled = {{ not $ENABLE_WELCOME_PAGE }};
312+
};
320313

321314
// Close page.
322315
config.enableClosePage = {{ $ENABLE_CLOSE_PAGE }};
@@ -354,18 +347,19 @@ config.enableRemb = false;
354347
config.enableTcc = false;
355348
{{ end -}}
356349

357-
// Enable IPv6 support.
358-
config.useIPv6 = {{ $ENABLE_IPV6 }};
359350

360351
// Transcriptions (subtitles and buttons can be configured in interface_config)
361-
config.transcription = { enabled: {{ $ENABLE_TRANSCRIPTIONS }} };
362-
config.transcription.translationLanguages = {{ $TRANSLATION_LANGUAGES }};
363-
config.transcription.translationLanguagesHead = {{ $TRANSLATION_LANGUAGES_HEAD }};
364-
config.transcription.useAppLanguage = {{ $USE_APP_LANGUAGE }};
365-
config.transcription.preferredLanguage = '{{ $PREFERRED_LANGUAGE }}';
366-
config.transcription.disableStartForAll = {{ $DISABLE_START_FOR_ALL }};
367-
config.transcription.autoCaptionOnRecord = {{ $AUTO_CAPTION_ON_RECORD }};
368-
352+
config.transcription = {
353+
enabled: {{ $ENABLE_TRANSCRIPTIONS }},
354+
translationLanguages = {{ $TRANSLATION_LANGUAGES }},
355+
translationLanguagesHead = {{ $TRANSLATION_LANGUAGES_HEAD }},
356+
useAppLanguage = {{ $USE_APP_LANGUAGE }},
357+
preferredLanguage = '{{ $PREFERRED_LANGUAGE }}',
358+
disableStartForAll = {{ $DISABLE_START_FOR_ALL }},
359+
autoCaptionOnRecord = {{ $AUTO_CAPTION_ON_RECORD }},
360+
};
361+
362+
// Dynamic branding
369363
{{ if .Env.DYNAMIC_BRANDING_URL -}}
370364
// External API url used to receive branding specific information.
371365
config.dynamicBrandingUrl = '{{ .Env.DYNAMIC_BRANDING_URL }}';
@@ -374,15 +368,15 @@ config.brandingDataUrl = '{{ .Env.BRANDING_DATA_URL }}';
374368
{{ end -}}
375369

376370
{{ if .Env.TOKEN_AUTH_URL -}}
377-
// Authenticate using external service or just focus external auth window if there is one already.
371+
// Authenticate using external service
378372
config.tokenAuthUrl = '{{ .Env.TOKEN_AUTH_URL }}';
379373
{{ end -}}
380374

381375

382376
// Deployment information.
383377
//
384378

385-
if (!config.hasOwnProperty('deploymentInfo')) config.deploymentInfo = {};
379+
config.deploymentInfo = {};
386380

387381
{{ if .Env.DEPLOYMENTINFO_ENVIRONMENT -}}
388382
config.deploymentInfo.environment = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT }}';
@@ -455,15 +449,18 @@ config.hiddenPremeetingButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREME
455449
{{ end -}}
456450

457451
// Configure remote participant video menu
458-
if (!config.hasOwnProperty('remoteVideoMenu')) config.remoteVideoMenu = {};
459-
config.remoteVideoMenu.disabled = {{ $DISABLE_REMOTE_VIDEO_MENU }};
460-
config.remoteVideoMenu.disableKick = {{ $DISABLE_KICKOUT }};
461-
config.remoteVideoMenu.disableGrantModerator = {{ $DISABLE_GRANT_MODERATOR }};
462-
config.remoteVideoMenu.disablePrivateChat = {{ $DISABLE_PRIVATE_CHAT }};
452+
config.remoteVideoMenu = {
453+
disabled: {{ $DISABLE_REMOTE_VIDEO_MENU }},
454+
disableKick: {{ $DISABLE_KICKOUT }},
455+
disableGrantModerator: {{ $DISABLE_GRANT_MODERATOR }},
456+
disablePrivateChat: {{ $DISABLE_PRIVATE_CHAT }}
457+
};
463458

464459
// Configure e2eping
465-
if (!config.hasOwnProperty('e2eping')) config.e2eping = {};
466-
config.e2eping.enabled = {{ $ENABLE_E2EPING }};
460+
config.e2eping = {
461+
enabled: {{ $ENABLE_E2EPING }}
462+
};
463+
467464
{{ if .Env.E2EPING_NUM_REQUESTS -}}
468465
config.e2eping.numRequests = {{ .Env.E2EPING_NUM_REQUESTS }};
469466
{{ end -}}
@@ -475,10 +472,12 @@ config.e2eping.maxMessagePerSecond = {{ .Env.E2EPING_MAX_MESSAGE_PER_SECOND }};
475472
{{ end }}
476473

477474
// Settings for the Excalidraw whiteboard integration.
478-
if (!config.hasOwnProperty('whiteboard')) config.whiteboard = {};
479-
config.whiteboard.enabled = {{ $WHITEBOARD_ENABLED }};
480-
config.whiteboard.collabServerBaseUrl = '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}';
475+
config.whiteboard = {
476+
enabled: {{ $WHITEBOARD_ENABLED }},
477+
collabServerBaseUrl: '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}'
478+
};
481479

482480
// Testing
483-
if (!config.hasOwnProperty('testing')) config.testing = {};
484-
config.testing.enableAv1Support = {{ $TESTING_AV1_SUPPORT }};
481+
config.testing = {
482+
enableAv1Support: {{ $TESTING_AV1_SUPPORT }}
483+
};

web/rootfs/defaults/system-config.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{{ $BOSH_RELATIVE := .Env.BOSH_RELATIVE | default "false" | toBool -}}
2-
{{ $CONFIG_EXTERNAL_CONNECT := .Env.CONFIG_EXTERNAL_CONNECT | default "false" | toBool -}}
32
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "false" | toBool -}}
43
{{ $ENABLE_AUTH_DOMAIN := .Env.ENABLE_AUTH_DOMAIN | default "true" | toBool -}}
54
{{ $ENABLE_GUESTS := .Env.ENABLE_GUESTS | default "false" | toBool -}}
@@ -12,10 +11,11 @@
1211
{{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
1312
{{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}}
1413
{{ $JVB_PREFER_SCTP := .Env.JVB_PREFER_SCTP | default "false" | toBool -}}
14+
1515
// Jitsi Meet configuration.
1616
var config = {};
1717

18-
if (!config.hasOwnProperty('hosts')) config.hosts = {};
18+
config.hosts = {};
1919

2020
config.hosts.domain = '{{ $XMPP_DOMAIN }}';
2121
config.focusUserJid = 'focus@{{$XMPP_AUTH_DOMAIN}}';
@@ -67,15 +67,8 @@ config.websocket = 'wss://{{ $PUBLIC_URL_DOMAIN }}/xmpp-websocket';
6767
{{ end -}}
6868
{{ end -}}
6969

70-
{{ if $CONFIG_EXTERNAL_CONNECT -}}
71-
{{ if $ENABLE_SUBDOMAINS -}}
72-
config.externalConnectUrl = '/' + subdir + 'http-pre-bind';
73-
{{ else -}}
74-
config.externalConnectUrl = '/http-pre-bind';
75-
{{ end -}}
76-
{{ end -}}
77-
7870
{{ if $JVB_PREFER_SCTP -}}
79-
if (!config.hasOwnProperty('bridgeChannel')) config.bridgeChannel = {};
80-
config.bridgeChannel.preferSctp=true;
71+
config.bridgeChannel = {
72+
preferSctp: true
73+
};
8174
{{ end -}}

0 commit comments

Comments
 (0)