From 85110b7f5c90a0650b7a6558f726deb95582c872 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 29 Nov 2022 02:44:40 +0200 Subject: [PATCH] Update server --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index f684f20..07a62eb 100644 --- a/app.js +++ b/app.js @@ -364,12 +364,12 @@ peers.on('connection', async socket => { const callId = socketDetails[socket.id]; console.log('[consume] callId', callId); - const canConsumeVideo = videoCalls[callId].producerVideo && !!videoCalls[callId].router.canConsume({ + const canConsumeVideo = !!videoCalls[callId].producerVideo && !!videoCalls[callId].router.canConsume({ producerId: videoCalls[callId].producerVideo.id, rtpCapabilities }) - const canConsumeAudio = videoCalls[callId].producerAudio && !!videoCalls[callId].router.canConsume({ + const canConsumeAudio = !!videoCalls[callId].producerAudio && !!videoCalls[callId].router.canConsume({ producerId: videoCalls[callId].producerAudio.id, rtpCapabilities })