LINXD-2209: Correctly close the call
This commit is contained in:
parent
19808da24e
commit
c059dd5afc
6
app.js
6
app.js
@ -198,23 +198,25 @@ peers.on('connection', async socket => {
|
||||
})
|
||||
|
||||
videoCalls[callId].consumer.on('transportclose', () => {
|
||||
const callId = socketDetails[socket.id];
|
||||
console.log('transport close from consumer', callId)
|
||||
|
||||
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-close
|
||||
stvideoCallsate[callId].router.close()
|
||||
delete videoCalls[callId].router
|
||||
videoCalls[callId].producer.close()
|
||||
videoCalls[callId].consumer.close()
|
||||
delete videoCalls[callId].router
|
||||
})
|
||||
|
||||
videoCalls[callId].consumer.on('producerclose', () => {
|
||||
const callId = socketDetails[socket.id];
|
||||
console.log('producer of consumer closed', callId)
|
||||
|
||||
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-close
|
||||
videoCalls[callId].router.close()
|
||||
delete videoCalls[callId].router
|
||||
videoCalls[callId].producer.close()
|
||||
videoCalls[callId].consumer.close()
|
||||
delete videoCalls[callId].router
|
||||
})
|
||||
|
||||
// from the consumer extract the following params
|
||||
|
Loading…
Reference in New Issue
Block a user