From 7e3e40e5e1a3c71f945bfbc17ce808d58702c75b Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 21 Feb 2023 02:00:02 +0200 Subject: [PATCH] LH-276: Update producer close event handler --- app.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index 0e9cdf8..cb5928d 100644 --- a/app.js +++ b/app.js @@ -521,13 +521,13 @@ peers.on('connection', async (socket) => { socket.on('close-producer', ({ callId, kind}) => { try { console.log(`[close-producer] callId: ${callId} | kind: ${kind}`); - if (isInitiator(callId, socket.id)) { - if (kind === 'video') videoCalls[callId].initiatorVideoProducer.close() - else if (kind === 'audio') videoCalls[callId].initiatorAudioProducer.close() - } else { - if (kind === 'video') videoCalls[callId].receiverVideoProducer.close() - else if (kind === 'audio') videoCalls[callId].receiverAudioProducer.close() - } + // if (isInitiator(callId, socket.id)) { + // if (kind === 'video') videoCalls[callId].initiatorVideoProducer.close() + // else if (kind === 'audio') videoCalls[callId].initiatorAudioProducer.close() + // } else { + // if (kind === 'video') videoCalls[callId].receiverVideoProducer.close() + // else if (kind === 'audio') videoCalls[callId].receiverAudioProducer.close() + // } } catch (error) { console.error(`ERROR | consumer-resume | callId ${socketDetails[socket.id]} | error: ${error.message}`); }