From 4e92f6cdd375f6b01ed8185edb29a5f76ad2f92c Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Wed, 31 Aug 2022 16:43:59 +0300 Subject: [PATCH] Remove callback with producer id from transport-produce --- app.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app.js b/app.js index 452fe44..c3532dc 100644 --- a/app.js +++ b/app.js @@ -149,13 +149,12 @@ peers.on('connection', async socket => { }) // see client's socket.emit('transport-produce', ...) - socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => { + socket.on('transport-produce', async ({ kind, rtpParameters, appData }) => { // call produce based on the prameters from the client producer = await producerTransport.produce({ kind, rtpParameters, }) - console.log('callback', callback); console.log(`[transport-produce] Producer ID: ${producer.id} | kind: ${producer.kind}`) producer.on('transportclose', () => { @@ -168,11 +167,6 @@ peers.on('connection', async socket => { router[callId].close() delete router[callId] }) - - // Send back to the client the Producer's id - callback({ - id: producer.id - }) }) // see client's socket.emit('transport-recv-connect', ...)