From 9634aac15380ab240a2f3e962e9df158c9e2c105 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Fri, 16 Dec 2022 11:59:10 +0200 Subject: [PATCH] Update --- app.js | 7 ++----- public/bundle.js | 4 +--- public/index.js | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/app.js b/app.js index f9d3a52..533110a 100644 --- a/app.js +++ b/app.js @@ -223,12 +223,9 @@ peers.on('connection', async socket => { - If the client is producer(sender: true) then it will use parameters for device.createSendTransport(params) - If the client is a consumer(sender: false) then it will use parameters for device.createRecvTransport(params) */ - socket.on('createWebRtcTransport', async (data, callback) => { + socket.on('createWebRtcTransport', async ({ sender }, callback) => { try { - console.log('🟥 WARNING', JSON.stringify(data)); - console.log('createWebRtcTransport-----------------------data', data, 'socketid', socket.id); - const { sender } = data - console.log('createWebRtcTransport-----------------------sender', sender); + console.log('🟥', JSON.stringify(sender), socket.id); const callId = socketDetails[socket.id]; console.log(`[createWebRtcTransport] socket ${socket.id} | sender ${sender} | callId ${callId}`); if (sender) { diff --git a/public/bundle.js b/public/bundle.js index ae7d0d2..6617061 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20580,9 +20580,7 @@ const createSendTransport = () => { console.log('[createSendTransport'); // see server's socket.on('createWebRtcTransport', sender?, ...) // this is a call from Producer, so sender = true - console.log('EMIT sender: true!!!!!!!!!!!!!!!!!!!!'); - // const data1 = { sender: 'true123', test: '123', sender1: true }; - socket.emit('createWebRtcTransport', { sender: 'true123', test: '123', sender1: true }, (value) => { + socket.emit('createWebRtcTransport', { sender: true }, (value) => { console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`); diff --git a/public/index.js b/public/index.js index c161a23..8af28c4 100644 --- a/public/index.js +++ b/public/index.js @@ -222,9 +222,7 @@ const createSendTransport = () => { console.log('[createSendTransport'); // see server's socket.on('createWebRtcTransport', sender?, ...) // this is a call from Producer, so sender = true - console.log('EMIT sender: true!!!!!!!!!!!!!!!!!!!!'); - // const data1 = { sender: 'true123', test: '123', sender1: true }; - socket.emit('createWebRtcTransport', { sender: 'true123', test: '123', sender1: true }, (value) => { + socket.emit('createWebRtcTransport', { sender: true }, (value) => { console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`);