-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
39/add mic mute #44
39/add mic mute #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, but, as discussed, let's use the full input media source instead of just one track
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I realized we need to clear the connected MediaStream when a peer connection is closed, or it will be kept in memory in the global state even when not in use.
This makes me think that dispatching from the attachInputAudioToPeerConnection
is the wrong place, since we would like to keep the dispatch and clean up logic in the same place.
I think the canonical react solution would be to put this in the useEffect
in useRtcConnection
, since the clean up logic could then be put inside the return value of that useEffect
.
More specifically, in use-rtc-connection.ts
:
- dispatch the connected audio stream inside the
if (inputAudioStream !== "no-device") {
check on line 172 - dispatch an event that sets the connected media stream to null inside the return value on line 188
331d416
to
471d909
Compare
295789f
to
acf3f9f
Compare
No description provided.