From 6a570879e19e2d3257c41e1a0eebfd7f5d550768 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Fri, 13 Jan 2023 19:49:21 +0200 Subject: [PATCH] test --- app.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/app.js b/app.js index ffab160..6443a33 100644 --- a/app.js +++ b/app.js @@ -301,18 +301,22 @@ peers.on('connection', async socket => { worker.pid, router.id, transport.id, producer.id ); - if (!isInitiator(callId, socket.id)) { - console.log('🟥 Emit to initiatorSocket'); - videoCalls[callId].initiatorSocket.emit('new-producer', { - callId - }); + // if (!isInitiator(callId, socket.id)) { + // console.log('🟥 Emit to initiatorSocket'); + // videoCalls[callId].initiatorSocket.emit('new-producer', { + // callId + // }); - } else { - console.log('🟥 Emit to receiverSocket'); - videoCalls[callId].receiverSocket.emit('new-producer', { - callId - }); - } + // } else { + // console.log('🟥 Emit to receiverSocket'); + // videoCalls[callId].receiverSocket.emit('new-producer', { + // callId + // }); + // } + + videoCalls[callId].receiverSocket.emit('new-producer', { + callId + }); // videoCalls[callId].initiatorSocket.emit('new-producer', { // callId