Move params to config

auto_join_3.3
Mészáros Mihály 2020-04-15 08:18:03 +02:00
parent 8ac9bf1d9c
commit 5a9fc063bf
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
}