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}`)
|
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', () => {
|
producer.on('transportclose', () => {
|
||||||
console.log('transport2 for this producer closed', callId)
|
console.log('transport for this producer closed ')
|
||||||
closeRoom(callId);
|
producer.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Send back to the client the Producer's id
|
// Send back to the client the Producer's id
|
||||||
@ -192,14 +187,8 @@ peers.on('connection', async socket => {
|
|||||||
paused: true,
|
paused: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
consumer.on('transportclose', ({ callId }) => {
|
|
||||||
console.log('transport close from consumer', callId)
|
|
||||||
closeRoom(callId);
|
|
||||||
})
|
|
||||||
|
|
||||||
consumer.on('transportclose', () => {
|
consumer.on('transportclose', () => {
|
||||||
console.log('transport2 close from consumer', callId)
|
console.log('transport close from consumer')
|
||||||
closeRoom(callId);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
consumer.on('producerclose', () => {
|
consumer.on('producerclose', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user