LINXD-2270-p2 #19

Closed
sergiu wants to merge 58 commits from LINXD-2270-p2 into develop
Showing only changes of commit 92fbecc36a - Show all commits

13
app.js
View File

@ -200,9 +200,9 @@ peers.on('connection', async socket => {
console.log('[createRoom] callId', callId);
videoCalls[callId] = { router: await worker.createRouter({ mediaCodecs }) }
console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`);
videoCalls[callId].initiatorSockerId = socket.id
} else {
videoCalls[callId].receiverSocketId = socket.id
} else {
videoCalls[callId].initiatorSockerId = socket.id
}
socketDetails[socket.id] = callId;
// rtpCapabilities is set for callback
@ -453,6 +453,10 @@ const consumeAudio = async (callId, rtpCapabilities) => {
console.log('producer of consumer closed', callId);
closeCall(callId);
});
if(isInitiator(callId, sockId)) {
}
return {
id: videoCalls[callId].consumerAudio.id,
producerId: videoCalls[callId].producerAudio.id,
@ -461,9 +465,8 @@ const consumeAudio = async (callId, rtpCapabilities) => {
}
}
const isInitiator = async (callId, socketId) => {
if (videoCalls[callId].initiatorSockerId === socketId) return true;
else return false
const isInitiator = (callId, socketId) => {
return (videoCalls[callId].initiatorSockerId === socketId);
}
/*