Move params to config
parent
8ac9bf1d9c
commit
5a9fc063bf
|
|
@ -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 : [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue