Refactor transportclose 7
This commit is contained in:
parent
65b5b563ff
commit
ac5d5d7fd0
17
app.js
17
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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user