LH-276: Add close-producer event handler; Update client #30

Merged
sergiu merged 9 commits from LH-276-close-producer into develop 2023-02-23 09:46:42 +00:00
Member
No description provided.
sergiu added 1 commit 2023-02-21 00:43:45 +00:00
sergiu requested review from cristi 2023-02-21 00:43:50 +00:00
cristi requested changes 2023-02-22 11:00:12 +00:00
app.js Outdated
@ -446,0 +415,4 @@
!!videoCalls[callId].router.canConsume({
producerId: videoCalls[callId].initiatorAudioProducer.id,
rtpCapabilities,
});
Owner
  • we should not use the same variables for both receiver and initiator, we can improve the naming with something like canConsumeAudioReceiver and canConsumeAudioInitiator
  • the assignments for canConsumeAudio and canConsumeVideo are very similar and very hard to distinguish if something is wrong, extract it in a function and use it in all 4 places
    • something like: initCanConsume(producer, callId, rtpCapabilities)
  • not sure if !! is necessary in all places
* we should not use the same variables for both receiver and initiator, we can improve the naming with something like `canConsumeAudioReceiver` and `canConsumeAudioInitiator` * the assignments for `canConsumeAudio` and `canConsumeVideo` are very similar and very hard to distinguish if something is wrong, extract it in a function and use it in all 4 places * something like: `initCanConsume(producer, callId, rtpCapabilities)` * not sure if `!!` is necessary in all places
app.js Outdated
@ -477,0 +461,4 @@
videoCalls[callId].receiverConsumerVideo && videoCalls[callId].receiverConsumerVideo.resume();
videoCalls[callId].receiverConsumerAudio && videoCalls[callId].receiverConsumerAudio.resume();
}
} catch (error) {
Owner
  • optional chaining
  • based on isInitiatorValue we can assign consumerVideo and consumerAudio and call resume on them
consumerVideo = isInitiatorValue?  videoCalls[callId].initiatorConsumerVideo : videoCalls[callId].receiverConsumerVideo
consumerAudio = ...
consumerVideo?.resume();
* optional chaining * based on `isInitiatorValue` we can assign `consumerVideo` and `consumerAudio` and call resume on them ```javascript consumerVideo = isInitiatorValue? videoCalls[callId].initiatorConsumerVideo : videoCalls[callId].receiverConsumerVideo consumerAudio = ... consumerVideo?.resume(); ```
sergiu marked this conversation as resolved
sergiu added 1 commit 2023-02-22 16:22:33 +00:00
sergiu added 1 commit 2023-02-22 16:31:08 +00:00
sergiu added 1 commit 2023-02-22 16:33:19 +00:00
sergiu added 1 commit 2023-02-22 16:37:38 +00:00
sergiu added 1 commit 2023-02-22 16:41:36 +00:00
sergiu added 1 commit 2023-02-22 16:46:49 +00:00
sergiu added 1 commit 2023-02-22 16:51:15 +00:00
sergiu added 1 commit 2023-02-22 16:58:36 +00:00
sergiu requested review from cristi 2023-02-22 17:04:54 +00:00
cristi approved these changes 2023-02-22 17:50:43 +00:00
cristi left a comment
Owner

Let's test it well before merging.

Let's test it well before merging.
sergiu merged commit df7f1987f6 into develop 2023-02-23 09:46:42 +00:00
sergiu deleted branch LH-276-close-producer 2023-02-23 09:46:47 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Safemobile/mediasoup#30
No description provided.