This commit is contained in:
Sergiu Toma 2022-12-19 11:29:24 +02:00
parent 0731090b0e
commit bb4cd756f3

6
app.js
View File

@ -451,11 +451,13 @@ peers.on('connection', async socket => {
console.log(`[consumer-resume] callId ${callId}`)
if (isInitiator(callId, socket.id)) {
console.log(`[consumer-resume] isInitiator true`);
await videoCalls[callId].initiatorConsumerVideo.resume();
await videoCalls[callId].initiatorConsumerAudio.resume();
} else {
await videoCalls[callId].receiverConsumerVideo.resume();
await videoCalls[callId].receiverConsumerAudio.resume();
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].consumerVideo.resume();
// await videoCalls[callId].consumerAudio.resume();