Refactor transportclose 20

This commit is contained in:
Sergiu Toma 2022-08-12 15:07:13 +03:00
parent 004c0f66a7
commit 383e34bf22

3
app.js
View File

@ -109,7 +109,9 @@ peers.on('connection', async socket => {
})
socket.on('createRoom', async ({ callId }, callback) => {
console.log('[createRoom] callId', callId);
console.log('Router length:', Object.keys(router).length);
console.log('1 - router[callId]', router[callId]);
if (router[callId] === undefined) {
// worker.createRouter(options)
// options = { mediaCodecs, appData }
@ -118,6 +120,7 @@ peers.on('connection', async socket => {
// none of the two are required
router[callId] = await worker.createRouter({ mediaCodecs })
console.log(`[createRoom] Router ID: ${router[callId].id}`)
console.log('2 - router[callId]', router[callId]);
}
getRtpCapabilities(callId, callback)