LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously #3

Merged
sergiu merged 31 commits from LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously into master 2022-09-15 14:49:55 +00:00
Showing only changes of commit c059dd5afc - Show all commits

6
app.js
View File

@ -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()

Function to clearVideoCall and socket.

Function to clearVideoCall and socket.
videoCalls[callId].consumer.close()
delete videoCalls[callId].router
})
// from the consumer extract the following params