diff --git a/docker-compose.yml b/docker-compose.yml index 3e67d4b8c9..4d04cd332d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,7 +49,9 @@ services: - ENABLE_IPV6 - ENABLE_LIPSYNC - ENABLE_NO_AUDIO_DETECTION + - ENABLE_STUN_TURN - ENABLE_P2P + - ENABLE_P2P_STUN_TURN - ENABLE_PREJOIN_PAGE - ENABLE_RECORDING - ENABLE_REMB diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js index 7471e50074..f182fa45a7 100644 --- a/web/rootfs/defaults/settings-config.js +++ b/web/rootfs/defaults/settings-config.js @@ -7,7 +7,9 @@ {{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}} {{ $ENABLE_LIPSYNC := .Env.ENABLE_LIPSYNC | default "false" | toBool -}} {{ $ENABLE_NO_AUDIO_DETECTION := .Env.ENABLE_NO_AUDIO_DETECTION | default "false" | toBool -}} +{{ $ENABLE_STUN_TURN := .Env.ENABLE_STUN_TURN | default "false" | toBool -}} {{ $ENABLE_P2P := .Env.ENABLE_P2P | default "true" | toBool -}} +{{ $ENABLE_P2P_STUN_TURN := .Env.ENABLE_P2P_STUN_TURN | default "false" | toBool -}} {{ $ENABLE_PREJOIN_PAGE := .Env.ENABLE_PREJOIN_PAGE | default "false" | toBool -}} {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "false" | toBool -}} {{ $ENABLE_REMB := .Env.ENABLE_REMB | default "true" | toBool -}} @@ -47,6 +49,8 @@ config.startVideoMuted = {{ $START_VIDEO_MUTED }}; config.startBitrate = '{{ .Env.START_BITRATE }}'; {{ end -}} +// Use XEP-0215 to fetch STUN and TURN servers. +config.useStunTurn = {{ $ENABLE_STUN_TURN }}; // Audio configuration. // @@ -65,6 +69,10 @@ config.startAudioMuted = {{ $START_AUDIO_MUTED }}; if (!config.hasOwnProperty('p2p')) config.p2p = {}; config.p2p.enabled = {{ $ENABLE_P2P }}; +config.p2p.useStunTurn = {{ $ENABLE_P2P_STUN_TURN }}; +{{ if .Env.P2P_STUN_SERVERS -}} +config.p2p.stunServers = [ {urls:'{{ join "'},{urls:'" (splitList "," .Env.P2P_STUN_SERVERS) }}'} ]; +{{ end -}} // Etherpad