From 59f8d4d3601d446118f5279403f9abc12ee698e9 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 21 Feb 2023 01:27:38 +0200 Subject: [PATCH] LH-276: Update producer close event handler --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index a0a2405..373054d 100644 --- a/app.js +++ b/app.js @@ -490,11 +490,11 @@ peers.on('connection', async (socket) => { socket.on('consumer-resume', () => { try { const callId = socketDetails[socket.id]; - const isInitiator = isInitiator(callId, socket.id); + const isInitiatorValue = isInitiator(callId, socket.id); console.log(`[consumer-resume] callId: ${callId} | isInitiator: ${isInitiator}`); console.log('videoCalls[callId]?.receiverConsumerVideo?', videoCalls[callId]?.receiverConsumerVideo); console.log('videoCalls[callId]?.receiverConsumerAudio', videoCalls[callId]?.receiverConsumerAudio); - if (isInitiator) { + if (isInitiatorValue) { videoCalls[callId]?.initiatorConsumerVideo?.resume(); videoCalls[callId]?.initiatorConsumerAudio?.resume(); } else {