Add new-producer event; Update client to consume when receives new-producer event #24
11
app.js
11
app.js
@ -266,17 +266,6 @@ peers.on('connection', async (socket) => {
|
||||
: videoCalls[callId].initiatorSocket;
|
||||
socketToEmit.emit('new-producer', { callId });
|
||||
|
||||
// if (!isInitiator(callId, socket.id)) {
|
||||
// await videoCalls[callId].receiverProducerTransport.connect({ dtlsParameters });
|
||||
// videoCalls[callId].initiatorSocket.emit('new-producer', {
|
||||
// callId,
|
||||
// });
|
||||
// } else {
|
||||
// await videoCalls[callId].initiatorProducerTransport.connect({ dtlsParameters });
|
||||
// videoCalls[callId].receiverSocket.emit('new-producer', {
|
||||
// callId,
|
||||
// });
|
||||
// }
|
||||
} catch (error) {
|
||||
console.log(`ERROR | transport-connect | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||
}
|
||||
sergiu marked this conversation as resolved
Outdated
|
||||
|
Loading…
Reference in New Issue
Block a user
We can refactor so that we only have one
emit
andconnect
instructions. Will be better when thenew-producer
messages changes.