From 00604279b57eb12ce64d07faec794dec5aa594e9 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 21 Feb 2023 01:38:50 +0200 Subject: [PATCH] LH-276: Update producer close event handler --- app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 29ca767..943b8cf 100644 --- a/app.js +++ b/app.js @@ -491,14 +491,14 @@ peers.on('connection', async (socket) => { try { const callId = socketDetails[socket.id]; const isInitiatorValue = isInitiator(callId, socket.id); - console.log(`[consumer-resume] callId: ${callId} | isInitiator: ${isInitiator}`); - if (isInitiatorValue) { - videoCalls[callId].initiatorConsumerVideo && videoCalls[callId].initiatorConsumerVideo.resume(); - videoCalls[callId].initiatorConsumerAudio && videoCalls[callId].initiatorConsumerAudio.resume(); - } else { - videoCalls[callId].receiverConsumerVideo && videoCalls[callId].receiverConsumerVideo.resume(); - videoCalls[callId].receiverConsumerAudio && videoCalls[callId].receiverConsumerAudio.resume(); - } + console.log(`[consumer-resume] callId: ${callId} | isInitiator: ${isInitiatorValue}`); + // if (isInitiatorValue) { + // videoCalls[callId].initiatorConsumerVideo && videoCalls[callId].initiatorConsumerVideo.resume(); + // videoCalls[callId].initiatorConsumerAudio && videoCalls[callId].initiatorConsumerAudio.resume(); + // } else { + // videoCalls[callId].receiverConsumerVideo && videoCalls[callId].receiverConsumerVideo.resume(); + // videoCalls[callId].receiverConsumerAudio && videoCalls[callId].receiverConsumerAudio.resume(); + // } } catch (error) { console.error(`[consumer-resume] | ERROR | callId: ${socketDetails[socket.id]} | isInitiator: ${isInitiator} | error: ${error.message}`); }