LINXD-2209: Correctly set router to videoCalls

This commit is contained in:
Sergiu Toma 2022-09-15 09:41:24 +03:00
parent ead0069aa8
commit 2f6c25c171

4
app.js
View File

@ -122,10 +122,10 @@ peers.on('connection', async socket => {
if (!videoCalls[callId]) { if (!videoCalls[callId]) {
console.log('create room'); console.log('create room');
console.log('[createRoom] callId', callId); console.log('[createRoom] callId', callId);
videoCalls[callId].router = await worker.createRouter({ mediaCodecs }); videoCalls[callId] = { router: await worker.createRouter({ mediaCodecs }) }
console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`) console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`)
} }
console.log('room exists'); console.log('room exists', videoCalls);
socketDetails[socket.id] = callId; socketDetails[socket.id] = callId;
getRtpCapabilities(callId, callback); getRtpCapabilities(callId, callback);
}) })