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') })