Check for initiatorConsumerAudio before resume()
This commit is contained in:
parent
b0293230b6
commit
df5b3eab90
6
app.js
6
app.js
@ -449,10 +449,12 @@ peers.on('connection', async socket => {
|
|||||||
console.log(`[consumer-resume] callId ${callId}`)
|
console.log(`[consumer-resume] callId ${callId}`)
|
||||||
|
|
||||||
if (isInitiator(callId, socket.id)) {
|
if (isInitiator(callId, socket.id)) {
|
||||||
|
console.log('🟩');
|
||||||
console.log(`[consumer-resume] isInitiator true`);
|
console.log(`[consumer-resume] isInitiator true`);
|
||||||
await videoCalls[callId].initiatorConsumerVideo.resume();
|
(videoCalls[callId].initiatorConsumerAudio) && await videoCalls[callId].initiatorConsumerVideo.resume();
|
||||||
await videoCalls[callId].initiatorConsumerAudio.resume();
|
(videoCalls[callId].initiatorConsumerAudio) && await videoCalls[callId].initiatorConsumerAudio.resume();
|
||||||
} else {
|
} else {
|
||||||
|
console.log('🟥');
|
||||||
console.log(`[consumer-resume] isInitiator false`);
|
console.log(`[consumer-resume] isInitiator false`);
|
||||||
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerVideo.resume();
|
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerVideo.resume();
|
||||||
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerAudio.resume();
|
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerAudio.resume();
|
||||||
|
Loading…
Reference in New Issue
Block a user