From 0bdc6fac3afc9419978bc2421c8ae3d4907ef31c Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 29 Nov 2022 03:17:28 +0200 Subject: [PATCH] Update server --- app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index dff83d3..8b33249 100644 --- a/app.js +++ b/app.js @@ -379,13 +379,13 @@ peers.on('connection', async socket => { if (canConsumeVideo && !canConsumeAudio) { console.log('1'); - const videoParams = consumeVideo(callId, rtpCapabilities) + const videoParams = await consumeVideo(callId, rtpCapabilities) console.log('videoParams', videoParams); callback({ videoParams, audioParams: null }); } else if (canConsumeVideo && canConsumeAudio) { console.log('2'); - const videoParams = consumeVideo(callId, rtpCapabilities) - const audioParams = consumeAudio(callId, rtpCapabilities) + const videoParams = await consumeVideo(callId, rtpCapabilities) + const audioParams = await consumeAudio(callId, rtpCapabilities) callback({ videoParams, audioParams }); } else { console.log(`[consume] Can't consume | callId ${callId}`);