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 accf960aa7 - Show all commits

4
app.js
View File

@ -205,6 +205,7 @@ peers.on('connection', async socket => {
})
socket.on('consume', async ({ rtpCapabilities, callId }, callback) => {
console.log('[consume] callId', callId);
try {
// console.log('consume', rtpCapabilities, callId);
// check if the router can consume the specified producer
@ -212,6 +213,7 @@ peers.on('connection', async socket => {
producerId: producer.id,
rtpCapabilities
})) {
console.log('[consume] Can consume', callId);
// transport can now consume and return a consumer

Function to clearVideoCall and socket.

Function to clearVideoCall and socket.
consumer = await consumerTransport.consume({
producerId: producer.id,
@ -252,7 +254,7 @@ peers.on('connection', async socket => {
callback({ params })
}
} catch (error) {
console.log(error.message)
console.log('[consume] Can\'t consume', error.message)
callback({
params: {
error: error