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}`); }