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 5bf31d452f - Show all commits

8
app.js
View File

@ -451,13 +451,13 @@ peers.on('connection', async socket => {
if (isInitiator(callId, socket.id)) {
console.log('🟩');

Check for videoCalls[callId].initiatorConsumerVideo is redundant.

Check for `videoCalls[callId].initiatorConsumerVideo` is redundant.
console.log(`[consumer-resume] isInitiator true`);
await videoCalls[callId].initiatorConsumerVideo.resume();
await videoCalls[callId].initiatorConsumerAudio.resume();
await videoCalls[callId]?.initiatorConsumerVideo?.resume();
await videoCalls[callId]?.initiatorConsumerAudio?.resume();
} else {
console.log('🟥');
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]?.receiverConsumerVideo?.resume();
await videoCalls[callId]?.receiverConsumerAudio?.resume();
}
} catch (error) {
console.log(`ERROR | consumer-resume | callId ${socketDetails[socket.id]} | ${error.message}`);