Mostly working mediasoup v3

This commit is contained in:
Håvar Aambø Fosstveit
2019-06-03 11:55:23 +02:00
parent e9b946ba93
commit 30f42d6ced
31 changed files with 2563 additions and 1741 deletions
+62 -58
View File
@@ -1,3 +1,5 @@
const os = require('os');
module.exports =
{
// oAuth2 conf
@@ -9,21 +11,21 @@ module.exports =
could be discovered on:
issuerURL + '/.well-known/openid-configuration'
*/
issuerURL : 'https://example.com'
clientOptions :
issuerURL : 'https://example.com',
clientOptions :
{
client_id : '',
client_secret : '',
scope : 'openid email profile'
client_id : '',
client_secret : '',
scope : 'openid email profile',
// where client.example.com is your multiparty meeting server
redirect_uri : 'https://client.example.com/auth/callback'
redirect_uri : 'https://client.example.com/auth/callback'
}
},
// session cookie secret
cookieSecret : 'T0P-S3cR3t_cook!e',
cookieSecret : 'T0P-S3cR3t_cook!e',
// Listening hostname for `gulp live|open`.
domain : 'localhost',
tls :
domain : 'localhost',
tls :
{
cert : `${__dirname}/../certs/mediasoup-demo.localhost.cert.pem`,
key : `${__dirname}/../certs/mediasoup-demo.localhost.key.pem`
@@ -33,59 +35,61 @@ module.exports =
// Any http request is redirected to https.
// Listening port for http server.
listeningRedirectPort : 80,
// STUN/TURN
// Mediasoup settings
mediasoup :
{
// mediasoup Server settings.
logLevel : 'warn',
logTags :
[
'info',
'ice',
'dtls',
'rtp',
'srtp',
'rtcp',
'rbe',
'rtx'
],
rtcIPv4 : true,
rtcIPv6 : true,
rtcAnnouncedIPv4 : null,
rtcAnnouncedIPv6 : null,
rtcMinPort : 40000,
rtcMaxPort : 49999,
// mediasoup Room codecs.
mediaCodecs :
[
{
kind : 'audio',
name : 'opus',
clockRate : 48000,
channels : 2,
parameters :
numWorkers : Object.keys(os.cpus()).length,
// mediasoup Worker settings.
worker :
{
logLevel : 'warn',
logTags :
[
'info',
'ice',
'dtls',
'rtp',
'srtp',
'rtcp'
],
rtcMinPort : 40000,
rtcMaxPort : 49999
},
// mediasoup Router settings.
router :
{
// Router media codecs.
mediaCodecs :
[
{
useinbandfec : 1
}
},
// {
// kind : 'video',
// name : 'VP8',
// clockRate : 90000
// }
{
kind : 'video',
name : 'H264',
clockRate : 90000,
parameters :
kind : 'audio',
mimeType : 'audio/opus',
clockRate : 48000,
channels : 2
},
{
'packetization-mode' : 1,
'profile-level-id' : '42e01f',
'level-asymmetry-allowed' : 1
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '42e01f',
'level-asymmetry-allowed' : 1,
'x-google-start-bitrate' : 1000
}
}
}
],
// mediasoup per Peer max sending bitrate (in bps).
maxBitrate : 500000
]
},
// mediasoup WebRtcTransport settings.
webRtcTransport :
{
listenIps :
[
{ ip: '1.2.3.4', announcedIp: null }
],
maxIncomingBitrate : 1500000,
initialAvailableOutgoingBitrate : 1000000
}
}
};