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', ...)