LH-276: Update producer close event handler

This commit is contained in:
Sergiu Toma 2023-02-21 01:02:24 +02:00
parent 5dfbec1c0d
commit 7f732785b9

2
app.js
View File

@ -494,9 +494,11 @@ peers.on('connection', async (socket) => {
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
console.log(`[consumer-resume] callId: ${callId}`); console.log(`[consumer-resume] callId: ${callId}`);
if (isInitiator(callId, socket.id)) { if (isInitiator(callId, socket.id)) {
console.log('1videoCalls[callId]', videoCalls[callId]);
videoCalls[callId]?.initiatorConsumerVideo?.resume(); videoCalls[callId]?.initiatorConsumerVideo?.resume();
videoCalls[callId]?.initiatorConsumerAudio?.resume(); videoCalls[callId]?.initiatorConsumerAudio?.resume();
} else { } else {
console.log('2 videoCalls[callId]', videoCalls[callId]);
videoCalls[callId]?.receiverConsumerVideo?.resume(); videoCalls[callId]?.receiverConsumerVideo?.resume();
videoCalls[callId]?.receiverConsumerAudio?.resume(); videoCalls[callId]?.receiverConsumerAudio?.resume();
} }