Check for initiatorConsumerAudio before resume()
This commit is contained in:
parent
c034610471
commit
5bf31d452f
8
app.js
8
app.js
@ -451,13 +451,13 @@ peers.on('connection', async socket => {
|
|||||||
if (isInitiator(callId, socket.id)) {
|
if (isInitiator(callId, socket.id)) {
|
||||||
console.log('🟩');
|
console.log('🟩');
|
||||||
console.log(`[consumer-resume] isInitiator true`);
|
console.log(`[consumer-resume] isInitiator true`);
|
||||||
await videoCalls[callId].initiatorConsumerVideo.resume();
|
await videoCalls[callId]?.initiatorConsumerVideo?.resume();
|
||||||
await videoCalls[callId].initiatorConsumerAudio.resume();
|
await videoCalls[callId]?.initiatorConsumerAudio?.resume();
|
||||||
} else {
|
} else {
|
||||||
console.log('🟥');
|
console.log('🟥');
|
||||||
console.log(`[consumer-resume] isInitiator false`);
|
console.log(`[consumer-resume] isInitiator false`);
|
||||||
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerVideo.resume();
|
await videoCalls[callId]?.receiverConsumerVideo?.resume();
|
||||||
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerAudio.resume();
|
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}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user