LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously #3
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
Function to clearVideoCall and socket.