From abb1533c9bd0aa32bb32d5c5fcd301e86a658dfc Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Wed, 22 Feb 2023 18:32:41 +0200 Subject: [PATCH] LH-276: Format code --- app.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app.js b/app.js index 640c56a..3482956 100644 --- a/app.js +++ b/app.js @@ -386,18 +386,13 @@ peers.on('connection', async (socket) => { - The consumer does consumerTransport.consume(params) */ socket.on('consume', async ({ rtpCapabilities }, callback) => { - try { - const callId = socketDetails[socket.id]; - const socketId = socket.id; - let audioParams, videoParams; + const callId = socketDetails[socket.id]; + const socketId = socket.id; + let audioParams, videoParams; - console.log(`[consume] socket ${socketId} | callId: ${callId}`); + console.log(`[consume] socket ${socketId} | callId: ${callId}`); - if (typeof rtpCapabilities === 'string') rtpCapabilities = JSON.parse(rtpCapabilities); - } catch (error) { - console.error(`[consume] | ERROR | callId: ${callId} | error: ${error.message}`); - callback({ params: { error } }); - } + if (typeof rtpCapabilities === 'string') rtpCapabilities = JSON.parse(rtpCapabilities); try { videoParams = await consumeVideo({ callId, socketId, rtpCapabilities });