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', () => {
|
videoCalls[callId].consumer.on('transportclose', () => {
|
||||||
|
const callId = socketDetails[socket.id];
|
||||||
console.log('transport close from consumer', callId)
|
console.log('transport close from consumer', callId)
|
||||||
|
|
||||||
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-close
|
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-close
|
||||||
stvideoCallsate[callId].router.close()
|
stvideoCallsate[callId].router.close()
|
||||||
delete videoCalls[callId].router
|
|
||||||
videoCalls[callId].producer.close()
|
videoCalls[callId].producer.close()
|
||||||
videoCalls[callId].consumer.close()
|
videoCalls[callId].consumer.close()
|
||||||
|
delete videoCalls[callId].router
|
||||||
})
|
})
|
||||||
|
|
||||||
videoCalls[callId].consumer.on('producerclose', () => {
|
videoCalls[callId].consumer.on('producerclose', () => {
|
||||||
|
const callId = socketDetails[socket.id];
|
||||||
console.log('producer of consumer closed', callId)
|
console.log('producer of consumer closed', callId)
|
||||||
|
|
||||||
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-close
|
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-close
|
||||||
videoCalls[callId].router.close()
|
videoCalls[callId].router.close()
|
||||||
delete videoCalls[callId].router
|
|
||||||
videoCalls[callId].producer.close()
|
videoCalls[callId].producer.close()
|
||||||
videoCalls[callId].consumer.close()
|
videoCalls[callId].consumer.close()
|
||||||
|
delete videoCalls[callId].router
|
||||||
})
|
})
|
||||||
|
|
||||||
// from the consumer extract the following params
|
// from the consumer extract the following params
|
||||||
|
Loading…
Reference in New Issue
Block a user