This commit is contained in:
Sergiu Toma 2023-01-13 18:54:20 +02:00
parent ed7feaecd5
commit 020be2f7b9

8
app.js
View File

@ -196,10 +196,10 @@ peers.on('connection', async socket => {
videoCalls[callId] = { router: await worker.createRouter({ mediaCodecs }) };
console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`);
videoCalls[callId].receiverSocket = socket;
console.log('🟦 videoCalls[callId].initiatorSocket', videoCalls[callId].receiverSocket)
console.log('🟦 videoCalls[callId].initiatorSocket.id', videoCalls[callId].receiverSocket.id)
} else {
videoCalls[callId].initiatorSocket = socket;
console.log('🟦 videoCalls[callId].initiatorSocket', videoCalls[callId].initiatorSocket)
console.log('🟦 videoCalls[callId].initiatorSocket.id', videoCalls[callId].initiatorSocket.id)
}
socketDetails[socket.id] = callId;
// rtpCapabilities is set for callback
@ -646,9 +646,9 @@ const consumeAudio = async (callId, socketId, rtpCapabilities) => {
}
const isInitiator = (callId, socketId) => {
console.log('videoCalls[callId].initiatorSocket.id', videoCalls[callId].initiatorSocket.id);
console.log('videoCalls[callId].initiatorSocket.id', videoCalls[callId].initiatorSocket.socket.id);
console.log('socketId', socketId);
return (videoCalls[callId].initiatorSocket.id === socketId);
return (videoCalls[callId].initiatorSocket.socket.id === socketId);
}
/*