LINXD-2209: Correctly close the call

This commit is contained in:
Sergiu Toma 2022-09-15 09:57:57 +03:00
parent c059dd5afc
commit a51a757d17
1 changed files with 1 additions and 3 deletions

4
app.js
View File

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