Refactor consumer-resume
This commit is contained in:
parent
9716bddd71
commit
c037240f47
8
app.js
8
app.js
@ -449,11 +449,11 @@ peers.on('connection', async socket => {
|
|||||||
console.log(`[consumer-resume] callId ${callId}`)
|
console.log(`[consumer-resume] callId ${callId}`)
|
||||||
const callId = socketDetails[socket.id];
|
const callId = socketDetails[socket.id];
|
||||||
if (isInitiator(callId, socket.id)) {
|
if (isInitiator(callId, socket.id)) {
|
||||||
videoCalls[callId].initiatorConsumerVideo && videoCalls[callId].initiatorConsumerVideo?.resume();
|
videoCalls[callId]?.initiatorConsumerVideo?.resume();
|
||||||
videoCalls[callId].initiatorConsumerAudio && videoCalls[callId].initiatorConsumerAudio?.resume();
|
videoCalls[callId]?.initiatorConsumerAudio?.resume();
|
||||||
} else {
|
} else {
|
||||||
videoCalls[callId].receiverConsumerVideo && videoCalls[callId].receiverConsumerVideo?.resume();
|
videoCalls[callId]?.receiverConsumerVideo?.resume();
|
||||||
videoCalls[callId].receiverConsumerAudio && videoCalls[callId].receiverConsumerAudio?.resume();
|
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}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user