From cf6725dec4ab15fdf6f504796cd6df445882eeee Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 21 Feb 2023 00:52:06 +0200 Subject: [PATCH] LH-276: Update producer close event handler --- app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index fb72583..212bf1e 100644 --- a/app.js +++ b/app.js @@ -294,7 +294,7 @@ peers.on('connection', async (socket) => { }); videoCalls[callId].receiverVideoProducer.observer.on("close", () => { - console.log(`[close-producer] receiverVideoProducer | callId: ${callId} | kind: ${kind}`); + console.log(`[close-producer] receiverVideoProducer receiver --EMIT--> initiator | callId: ${callId} | kind: ${kind}`); videoCalls[callId].initiatorSocket.emit('close-producer', { callId, kind }); }) @@ -319,7 +319,7 @@ peers.on('connection', async (socket) => { }); videoCalls[callId].initiatorVideoProducer.observer.on("close", () => { - console.log(`[close-producer] initiatorVideoProducer | callId: ${callId} | kind: ${kind}`); + console.log(`[close-producer] initiatorVideoProducer initiator --EMIT--> receiver | callId: ${callId} | kind: ${kind}`); videoCalls[callId].receiverSocket.emit('close-producer', { callId, kind }); }) @@ -345,7 +345,7 @@ peers.on('connection', async (socket) => { }); videoCalls[callId].receiverAudioProducer.observer.on("close", () => { - console.log(`[close-producer] receiverAudioProducer | callId: ${callId} | kind: ${kind}`); + console.log(`[close-producer] receiverAudioProducer receiver --EMIT--> initiator | callId: ${callId} | kind: ${kind}`); videoCalls[callId].initiatorSocket.emit('close-producer', { callId, kind }); }) @@ -370,8 +370,8 @@ peers.on('connection', async (socket) => { }); videoCalls[callId].initiatorAudioProducer.observer.on("close", () => { - console.log(`[close-producer] initiatorAudioProducer | callId: ${callId} | kind: ${kind}`); - videoCalls[callId].initiatorSocket.emit('close-producer', { callId, kind }); + console.log(`[close-producer] initiatorAudioProducer initiator --EMIT--> receiver | callId: ${callId} | kind: ${kind}`); + videoCalls[callId].receiverSocket.emit('close-producer', { callId, kind }); }) // Send back to the client the Producer's id