LH-276: Update producer close event handler

This commit is contained in:
Sergiu Toma 2023-02-21 01:27:38 +02:00
parent f21a5f28ab
commit 59f8d4d360

4
app.js
View File

@ -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 {