LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously #3

Merged
sergiu merged 31 commits from LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously into master 2022-09-15 14:49:55 +00:00
Showing only changes of commit 031a7bc4c5 - Show all commits

3
app.js
View File

@ -114,7 +114,6 @@ const mediaCodecs = [
const getRtpCapabilities = (callId, callback) => { const getRtpCapabilities = (callId, callback) => {
const rtpCapabilities = router[callId].rtpCapabilities const rtpCapabilities = router[callId].rtpCapabilities
console.log('[getRtpCapabilities]', callId, callback, rtpCapabilities);
callback({ rtpCapabilities }) callback({ rtpCapabilities })
} }
@ -122,10 +121,8 @@ const mediaCodecs = [
if (queue.length > 0) { if (queue.length > 0) {
const { callId, callback } = queue.shift(); const { callId, callback } = queue.shift();
if (router[callId] === undefined) { if (router[callId] === undefined) {
console.log('🟢 callId', callId, '| callback', callback)
router[callId] = await worker.createRouter({ mediaCodecs }) router[callId] = await worker.createRouter({ mediaCodecs })
console.log(`[createRoom] Router ID: ${router[callId].id}`) console.log(`[createRoom] Router ID: ${router[callId].id}`)
console.log('🟡 router', router);
} }
getRtpCapabilities(callId, callback) getRtpCapabilities(callId, callback)
} }