Compare commits

...

13 Commits

8 changed files with 7 additions and 9 deletions

16
app.js
View File

@ -441,21 +441,19 @@ peers.on('connection', async socket => {
/* /*
- Event sent by the consumer after consuming to resume the pause - Event sent by the consumer after consuming to resume the pause
- When consuming on consumerTransport, it is initially done with paused: true, here we will resume - When consuming on consumerTransport, it is initially done with paused: true, here we will resume
- For the initiator we resume the initiatorConsumerAUDIO/VIDEO and for receiver the receiverConsumerAUDIO/VIDEO
*/ */
socket.on('consumer-resume', async () => { socket.on('consumer-resume',() => {
try { try {
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(`[consumer-resume] isInitiator true`); videoCalls[callId]?.initiatorConsumerVideo?.resume();
await videoCalls[callId].initiatorConsumerVideo.resume(); videoCalls[callId]?.initiatorConsumerAudio?.resume();
await videoCalls[callId].initiatorConsumerAudio.resume();
} else { } else {
console.log(`[consumer-resume] isInitiator false`); videoCalls[callId]?.receiverConsumerVideo?.resume();
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerVideo.resume(); videoCalls[callId]?.receiverConsumerAudio?.resume();
(videoCalls[callId].receiverConsumerVideo) && await 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}`);

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 KiB