1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-26 17:43:29 +02:00

Do not hardcode stun and turn scheme

Instead, read a ful uri from the config, so you can specify turns if you want
This commit is contained in:
Daniel Berteaud 2015-02-19 22:25:35 +01:00
parent 77c0a43ae3
commit 8ecbeb32a6
2 changed files with 7 additions and 7 deletions

View File

@ -9,11 +9,11 @@
;uri = 'https://vroom.exmple.com'
[turn]
; The stun server sent to client. You can set it to your own stun server
;stun_server = 'stun.l.google.com:19302'
; The turn server sent to cliet, you should set it to your own server
;turn_server = ''
; the realm used for turn accounts. You shouldn't have to change it
; The stun server sent to client. You can set it to your own stun server. Takes a full stun uri as defined by rfc7064
;stun_server = 'stun:stun.l.google.com:19302'
; The turn server sent to cliet, you should set it to your own server. Takes a full turn uri as defined by rfc7065
;turn_server = 'turns:my-turn-server.net:5349?transport=tcp'
; the realm used for turn accounts. Must match the realm of your turn server
;realm = 'vroom'
[email]

View File

@ -455,8 +455,8 @@
url: "<%= $config->{'signaling.uri'} %>",
peerConnectionConfig: {
iceServers: [
{"url":"stun:<%= $config->{'turn.stun_server'} %>"},
<%== ($config->{'turn.turn_server'} && $config->{'turn.turn_server'} ne '') ? "{\"url\":\"turn:$config->{'turn.turn_server'}\", \"username\":\"$room\", \"credential\":\"$turnPassword\"}":'' %>
{"url":"<%= $config->{'turn.stun_server'} %>"},
<%== ($config->{'turn.turn_server'} && $config->{'turn.turn_server'} ne '') ? "{\"url\":\"$config->{'turn.turn_server'}\", \"username\":\"$room\", \"credential\":\"$turnPassword\"}":'' %>
]
},
localVideoEl: 'webRTCVideoLocal',