Update server

This commit is contained in:
Sergiu Toma 2022-11-29 02:40:25 +02:00
parent 5169d0d49f
commit 359c7c784e

5
app.js
View File

@ -364,8 +364,6 @@ peers.on('connection', async socket => {
const callId = socketDetails[socket.id];
console.log('[consume] callId', callId);
console.log('🟠 videoCalls[callId].producerAudio', videoCalls[callId].producerAudio);
const canConsumeVideo = videoCalls[callId].producerVideo && videoCalls[callId].router.canConsume({
producerId: videoCalls[callId].producerVideo.id,
rtpCapabilities
@ -376,6 +374,9 @@ peers.on('connection', async socket => {
rtpCapabilities
})
console.log('[consume] canConsumeVideo', canConsumeVideo);
console.log('[consume] canConsumeAudio', canConsumeAudio);
if (canConsumeVideo && !canConsumeAudio) {
const videoParams = consumeVideo(callId, rtpCapabilities)
callback({ videoParams, audioParams: null });