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
|
// URI and key for requesting geoip-based TURN server closest to the client
|
||||||
turnAPIKey : 'examplekey',
|
turnAPIKey : 'examplekey',
|
||||||
turnAPIURI : 'https://example.com/api/turn',
|
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
|
// Backup turnservers if REST fails or is not configured
|
||||||
backupTurnServers : [
|
backupTurnServers : [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -383,10 +383,7 @@ class Room extends EventEmitter
|
||||||
config.turnAPIURI,
|
config.turnAPIURI,
|
||||||
{
|
{
|
||||||
params : {
|
params : {
|
||||||
'uri_schema' : 'turn',
|
...config.turnAPIparams,
|
||||||
'transport' : 'tcp',
|
|
||||||
'ip_ver' : 'ipv4',
|
|
||||||
'servercount' : '2',
|
|
||||||
'api_key' : config.turnAPIKey,
|
'api_key' : config.turnAPIKey,
|
||||||
'ip' : peer.socket.request.connection.remoteAddress
|
'ip' : peer.socket.request.connection.remoteAddress
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue