-
Notifications
You must be signed in to change notification settings - Fork 728
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
Video 4601 fix audio input device #487
Conversation
|
||
export default function useRestartAudioTrackOnDeviceChange(localTracks: (LocalAudioTrack | LocalVideoTrack)[]) { |
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.
I think it would be nice to have a comment here to explain the purpose of the hook. I was thinking something like this:
export default function useRestartAudioTrackOnDeviceChange(localTracks: (LocalAudioTrack | LocalVideoTrack)[]) { | |
// If a user has published an audio track from an external audio input device and disconnects the device, the published | |
// audio track will be stopped and the user will no longer be heard be other participants. To prevent this issue, this hook | |
// will re-acquire a mediaStreamTrack from the system's default audio device when it detects that the published audio device | |
// has been disconnected. | |
export default function useRestartAudioTrackOnDeviceChange(localTracks: (LocalAudioTrack | LocalVideoTrack)[]) { |
What do you think?
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.
i think that is a good idea! i reformatted the comment but kept your wording. let me know if i should change it back!
@timmydoza do you know when this will be released? Thanks |
Hey @jszem! A new release that includes this bug fix has been published just now. Please let us know if you run into any other issues, or have any questions! |
Contributing to Twilio
Pull Request Details
JIRA link(s):
Description
This PR fixes the bug addressed in GitHub Issue #462.
When a user is connected to a room and uses an external microphone (or headphones with a built-in microphone), and then disconnects that mic, the other participants can no longer hear the user despite being unmuted. We fixed this bug by adding a new hook (
useRestartAudioTrackOnDeviceChange()
) to theVideoProvider
. This hook restarts the local audio track whenever there is a device change event and the track'smediaStreamTrack.readyState
is equal toended
.Burndown
Before review
npm test
Before merge