diff --git a/app.js b/app.js index 5262295..437c731 100644 --- a/app.js +++ b/app.js @@ -156,14 +156,9 @@ peers.on('connection', async socket => { console.log(`[transport-produce] Producer ID: ${producer.id} | kind: ${producer.kind}`) - producer.on('transportclose', ({ callId }) => { - console.log('transport for this producer closed', callId) - closeRoom(callId); - }) - producer.on('transportclose', () => { - console.log('transport2 for this producer closed', callId) - closeRoom(callId); + console.log('transport for this producer closed ') + producer.close() }) // Send back to the client the Producer's id @@ -192,14 +187,8 @@ peers.on('connection', async socket => { paused: true, }) - consumer.on('transportclose', ({ callId }) => { - console.log('transport close from consumer', callId) - closeRoom(callId); - }) - consumer.on('transportclose', () => { - console.log('transport2 close from consumer', callId) - closeRoom(callId); + console.log('transport close from consumer') }) consumer.on('producerclose', () => {