Refactor transportclose 3

This commit is contained in:
Sergiu Toma 2022-08-11 12:18:01 +03:00
parent e5fbb1e5a7
commit 7bb45dca19

10
app.js
View File

@ -161,6 +161,11 @@ peers.on('connection', async socket => {
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({
id: producer.id
@ -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')
})