Merge branch 'fix-hardcoded-rest-url' into develop

Fixes #190
auto_join_3.3
Mészáros Mihály 2020-04-16 13:51:28 +02:00
commit 6cb8e1d158
2 changed files with 8 additions and 4 deletions

View File

@ -38,6 +38,13 @@ module.exports =
// URI and key for requesting geoip-based TURN server closest to the client
turnAPIKey : 'examplekey',
turnAPIURI : 'https://example.com/api/turn',
turnAPIparams : {
'uri_schema' : 'turn',
'transport' : 'tcp',
'ip_ver' : 'ipv4',
'servercount' : '2'
},
// Backup turnservers if REST fails or is not configured
backupTurnServers : [
{

View File

@ -383,10 +383,7 @@ class Room extends EventEmitter
config.turnAPIURI,
{
params : {
'uri_schema' : 'turn',
'transport' : 'tcp',
'ip_ver' : 'ipv4',
'servercount' : '2',
...config.turnAPIparams,
'api_key' : config.turnAPIKey,
'ip' : peer.socket.request.connection.remoteAddress
}