From 7bb45dca194b8ccd02efedf9ae7dfe58145461f4 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Thu, 11 Aug 2022 12:18:01 +0300 Subject: [PATCH] Refactor transportclose 3 --- app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app.js b/app.js index 0e94571..0b9b0a5 100644 --- a/app.js +++ b/app.js @@ -160,6 +160,11 @@ peers.on('connection', async socket => { console.log('transport for this producer closed', callId) closeRoom(callId); }) + + producer.on('transportclose', () => { + console.log('transport2 for this producer closed', callId) + closeRoom(callId); + }) // Send back to the client the Producer's id callback({ @@ -192,6 +197,11 @@ peers.on('connection', async socket => { closeRoom(callId); }) + consumer.on('transportclose', () => { + console.log('transport2 close from consumer', callId) + closeRoom(callId); + }) + consumer.on('producerclose', () => { console.log('producer of consumer closed') })