diff --git a/app.js b/app.js index 0e38012..2d6f5f0 100644 --- a/app.js +++ b/app.js @@ -342,7 +342,7 @@ peers.on('connection', async (socket) => { // // callId - Id of the call // // kind - producer type: audio/video // socketToEmit.emit('new-producer', { callId, kind }); - receiverSocket.emit('close-producer', { callId, kind }); + videoCalls[callId].receiverSocket.emit('close-producer', { callId, kind }); }) videoCalls[callId].initiatorVideoProducer.on('producerclose', () => {