From bb4cd756f3100cfa1dac2756e0ff7170793ac5a0 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Dec 2022 11:29:24 +0200 Subject: [PATCH] Update --- app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index e4e130c..c60c76d 100644 --- a/app.js +++ b/app.js @@ -451,11 +451,13 @@ peers.on('connection', async socket => { console.log(`[consumer-resume] callId ${callId}`) if (isInitiator(callId, socket.id)) { + console.log(`[consumer-resume] isInitiator true`); await videoCalls[callId].initiatorConsumerVideo.resume(); await videoCalls[callId].initiatorConsumerAudio.resume(); } else { - await videoCalls[callId].receiverConsumerVideo.resume(); - await videoCalls[callId].receiverConsumerAudio.resume(); + console.log(`[consumer-resume] isInitiator false`); + (videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerVideo.resume(); + (videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerAudio.resume(); } // await videoCalls[callId].consumerVideo.resume(); // await videoCalls[callId].consumerAudio.resume();