test
This commit is contained in:
parent
ed7feaecd5
commit
020be2f7b9
8
app.js
8
app.js
@ -196,10 +196,10 @@ peers.on('connection', async socket => {
|
|||||||
videoCalls[callId] = { router: await worker.createRouter({ mediaCodecs }) };
|
videoCalls[callId] = { router: await worker.createRouter({ mediaCodecs }) };
|
||||||
console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`);
|
console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`);
|
||||||
videoCalls[callId].receiverSocket = socket;
|
videoCalls[callId].receiverSocket = socket;
|
||||||
console.log('🟦 videoCalls[callId].initiatorSocket', videoCalls[callId].receiverSocket)
|
console.log('🟦 videoCalls[callId].initiatorSocket.id', videoCalls[callId].receiverSocket.id)
|
||||||
} else {
|
} else {
|
||||||
videoCalls[callId].initiatorSocket = socket;
|
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;
|
socketDetails[socket.id] = callId;
|
||||||
// rtpCapabilities is set for callback
|
// rtpCapabilities is set for callback
|
||||||
@ -646,9 +646,9 @@ const consumeAudio = async (callId, socketId, rtpCapabilities) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isInitiator = (callId, socketId) => {
|
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);
|
console.log('socketId', socketId);
|
||||||
return (videoCalls[callId].initiatorSocket.id === socketId);
|
return (videoCalls[callId].initiatorSocket.socket.id === socketId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user