Merge pull request 'comsume-undefined' (#22) from comsume-undefined into develop
Reviewed-on: #22 Reviewed-by: Cristi Ene <cristi.ene@safemobile.com>
This commit is contained in:
commit
6fd6ca9755
16
app.js
16
app.js
@ -441,21 +441,19 @@ peers.on('connection', async socket => {
|
||||
|
||||
/*
|
||||
- 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 {
|
||||
const callId = socketDetails[socket.id];
|
||||
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();
|
||||
videoCalls[callId]?.initiatorConsumerVideo?.resume();
|
||||
videoCalls[callId]?.initiatorConsumerAudio?.resume();
|
||||
} else {
|
||||
console.log(`[consumer-resume] isInitiator false`);
|
||||
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerVideo.resume();
|
||||
(videoCalls[callId].receiverConsumerVideo) && await videoCalls[callId].receiverConsumerAudio.resume();
|
||||
videoCalls[callId]?.receiverConsumerVideo?.resume();
|
||||
videoCalls[callId]?.receiverConsumerAudio?.resume();
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`ERROR | consumer-resume | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||
|
Loading…
Reference in New Issue
Block a user