merge from develop
This commit is contained in:
+111
-14
@@ -1,5 +1,7 @@
|
||||
const os = require('os');
|
||||
const userRoles = require('../userRoles');
|
||||
// const AwaitQueue = require('awaitqueue');
|
||||
// const axios = require('axios');
|
||||
|
||||
module.exports =
|
||||
{
|
||||
@@ -34,8 +36,15 @@ module.exports =
|
||||
},
|
||||
*/
|
||||
// URI and key for requesting geoip-based TURN server closest to the client
|
||||
turnAPIKey : 'examplekey',
|
||||
turnAPIURI : 'https://example.com/api/turn',
|
||||
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 : [
|
||||
{
|
||||
@@ -46,24 +55,68 @@ module.exports =
|
||||
credential : 'example'
|
||||
}
|
||||
],
|
||||
fileTracker : 'wss://tracker.lab.vvc.niif.hu:443',
|
||||
redisOptions : {},
|
||||
// session cookie secret
|
||||
cookieSecret : 'T0P-S3cR3t_cook!e',
|
||||
cookieName : 'multiparty-meeting.sid',
|
||||
// if you use encrypted private key the set the passphrase
|
||||
tls :
|
||||
{
|
||||
cert : `${__dirname}/../certs/mediasoup-demo.localhost.cert.pem`,
|
||||
// passphrase: 'key_password'
|
||||
key : `${__dirname}/../certs/mediasoup-demo.localhost.key.pem`
|
||||
},
|
||||
// listening Host or IP
|
||||
// If omitted listens on every IP. ("0.0.0.0" and "::")
|
||||
// listeningHost: 'localhost',
|
||||
// Listening port for https server.
|
||||
listeningPort : 443,
|
||||
// Any http request is redirected to https.
|
||||
// Listening port for http server.
|
||||
// Listening port for http server.
|
||||
listeningRedirectPort : 80,
|
||||
// Listens only on http, only on listeningPort
|
||||
// listeningRedirectPort disabled
|
||||
// use case: loadbalancer backend
|
||||
httpOnly : false,
|
||||
// WebServer/Express trust proxy config for httpOnly mode
|
||||
// You can find more info:
|
||||
// - https://expressjs.com/en/guide/behind-proxies.html
|
||||
// - https://www.npmjs.com/package/proxy-addr
|
||||
// use case: loadbalancer backend
|
||||
trustProxy : '',
|
||||
// This logger class will have the log function
|
||||
// called every time there is a room created or destroyed,
|
||||
// or peer created or destroyed. This would then be able
|
||||
// to log to a file or external service.
|
||||
/* StatusLogger : class
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
this._queue = new AwaitQueue();
|
||||
}
|
||||
|
||||
// rooms: rooms object
|
||||
// peers: peers object
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
async log({ rooms, peers })
|
||||
{
|
||||
this._queue.push(async () =>
|
||||
{
|
||||
// Do your logging in here, use queue to keep correct order
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Number of rooms: ', rooms.size);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Number of peers: ', peers.size);
|
||||
})
|
||||
.catch((error) =>
|
||||
{
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('error in log', error);
|
||||
});
|
||||
}
|
||||
}, */
|
||||
// This function will be called on successful login through oidc.
|
||||
// Use this function to map your oidc userinfo to the Peer object.
|
||||
// The roomId is equal to the room name.
|
||||
@@ -124,6 +177,7 @@ module.exports =
|
||||
peer.addRole(userRoles.AUTHENTICATED);
|
||||
},
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
userMapping : async ({ peer, roomId, userinfo }) =>
|
||||
{
|
||||
if (userinfo.picture != null)
|
||||
@@ -153,20 +207,53 @@ module.exports =
|
||||
peer.email = userinfo.email;
|
||||
}
|
||||
},
|
||||
// Required roles for Access. All users have the role "ALL" by default.
|
||||
// Other roles need to be added in the "userMapping" function. This
|
||||
// is an Array of roles. userRoles.ADMIN have all priveleges and access
|
||||
// always.
|
||||
// All users have the role "NORMAL" by default. Other roles need to be
|
||||
// added in the "userMapping" function. The following accesses and
|
||||
// permissions are arrays of roles. Roles can be changed in userRoles.js
|
||||
//
|
||||
// Example:
|
||||
// [ userRoles.MODERATOR, userRoles.AUTHENTICATED ]
|
||||
// This will allow all MODERATOR and AUTHENTICATED users access.
|
||||
requiredRolesForAccess : [ userRoles.ALL ],
|
||||
accessFromRoles : {
|
||||
// The role(s) will gain access to the room
|
||||
// even if it is locked (!)
|
||||
BYPASS_ROOM_LOCK : [ userRoles.ADMIN ],
|
||||
// The role(s) will gain access to the room without
|
||||
// going into the lobby. If you want to restrict access to your
|
||||
// server to only directly allow authenticated users, you could
|
||||
// add the userRoles.AUTHENTICATED to the user in the userMapping
|
||||
// function, and change to BYPASS_LOBBY : [ userRoles.AUTHENTICATED ]
|
||||
BYPASS_LOBBY : [ userRoles.NORMAL ]
|
||||
},
|
||||
permissionsFromRoles : {
|
||||
// The role(s) have permission to lock/unlock a room
|
||||
CHANGE_ROOM_LOCK : [ userRoles.NORMAL ],
|
||||
// The role(s) have permission to promote a peer from the lobby
|
||||
PROMOTE_PEER : [ userRoles.NORMAL ],
|
||||
// The role(s) have permission to send chat messages
|
||||
SEND_CHAT : [ userRoles.NORMAL ],
|
||||
// The role(s) have permission to moderate chat
|
||||
MODERATE_CHAT : [ userRoles.MODERATOR ],
|
||||
// The role(s) have permission to share screen
|
||||
SHARE_SCREEN : [ userRoles.NORMAL ],
|
||||
// The role(s) have permission to produce extra video
|
||||
EXTRA_VIDEO : [ userRoles.NORMAL ],
|
||||
// The role(s) have permission to share files
|
||||
SHARE_FILE : [ userRoles.NORMAL ],
|
||||
// The role(s) have permission to moderate files
|
||||
MODERATE_FILES : [ userRoles.MODERATOR ],
|
||||
// The role(s) have permission to moderate room (e.g. kick user)
|
||||
MODERATE_ROOM : [ userRoles.MODERATOR ]
|
||||
},
|
||||
// When truthy, the room will be open to all users when as long as there
|
||||
// are allready users in the room
|
||||
activateOnHostJoin : true,
|
||||
activateOnHostJoin : true,
|
||||
// When set, maxUsersPerRoom defines how many users can join
|
||||
// a single room. If not set, there is no limit.
|
||||
// maxUsersPerRoom : 20,
|
||||
// Room size before spreading to new router
|
||||
routerScaleSize : 40,
|
||||
// Mediasoup settings
|
||||
mediasoup :
|
||||
mediasoup :
|
||||
{
|
||||
numWorkers : Object.keys(os.cpus()).length,
|
||||
// mediasoup Worker settings.
|
||||
@@ -247,11 +334,12 @@ module.exports =
|
||||
{
|
||||
listenIps :
|
||||
[
|
||||
// change ip to your servers IP address!
|
||||
{ ip: '0.0.0.0', announcedIp: null }
|
||||
// change 192.0.2.1 IPv4 to your server's IPv4 address!!
|
||||
{ ip: '192.0.2.1', announcedIp: null }
|
||||
|
||||
// Can have multiple listening interfaces
|
||||
// { ip: '::/0', announcedIp: null }
|
||||
// change 2001:DB8::1 IPv6 to your server's IPv6 address!!
|
||||
// { ip: '2001:DB8::1', announcedIp: null }
|
||||
],
|
||||
initialAvailableOutgoingBitrate : 1000000,
|
||||
minimumAvailableOutgoingBitrate : 600000,
|
||||
@@ -259,4 +347,13 @@ module.exports =
|
||||
maxIncomingBitrate : 1500000
|
||||
}
|
||||
}
|
||||
// Prometheus exporter
|
||||
/*
|
||||
prometheus: {
|
||||
deidentify: false, // deidentify IP addresses
|
||||
numeric: false, // show numeric IP addresses
|
||||
port: 8889, // allocated port
|
||||
quiet: false // include fewer labels
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user