comsume-undefined #22

Merged
sergiu merged 9 commits from comsume-undefined into develop 2023-01-12 13:31:47 +00:00
Showing only changes of commit c037240f47 - Show all commits

8
app.js
View File

@ -449,11 +449,11 @@ peers.on('connection', async socket => {
console.log(`[consumer-resume] callId ${callId}`) console.log(`[consumer-resume] callId ${callId}`)
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
if (isInitiator(callId, socket.id)) { if (isInitiator(callId, socket.id)) {
videoCalls[callId].initiatorConsumerVideo && videoCalls[callId].initiatorConsumerVideo?.resume(); videoCalls[callId]?.initiatorConsumerVideo?.resume();

Check for videoCalls[callId].initiatorConsumerVideo is redundant.

Check for `videoCalls[callId].initiatorConsumerVideo` is redundant.
videoCalls[callId].initiatorConsumerAudio && videoCalls[callId].initiatorConsumerAudio?.resume(); videoCalls[callId]?.initiatorConsumerAudio?.resume();
} else { } else {
videoCalls[callId].receiverConsumerVideo && videoCalls[callId].receiverConsumerVideo?.resume(); videoCalls[callId]?.receiverConsumerVideo?.resume();
videoCalls[callId].receiverConsumerAudio && videoCalls[callId].receiverConsumerAudio?.resume(); videoCalls[callId]?.receiverConsumerAudio?.resume();
} }
} catch (error) { } catch (error) {
console.log(`ERROR | consumer-resume | callId ${socketDetails[socket.id]} | ${error.message}`); console.log(`ERROR | consumer-resume | callId ${socketDetails[socket.id]} | ${error.message}`);