Skip to content
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

Use getSettings instead of getCapabilities to fix FF error #526

Merged
merged 1 commit into from
May 21, 2021

Conversation

timmydoza
Copy link
Contributor

@timmydoza timmydoza commented May 21, 2021

Contributing to Twilio

All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Pull Request Details

JIRA link(s):

  • N/A

Description

This PR fixes an issue where users are unable to acquire audio in Firefox due to an error.

This PR removes the usage of mediaStreamStrack.getCapabilities() and replaces it with mediaStreamStrack.getSettings(). These functions are used to get the deviceID after a camera track is acquired.

The error was due to the fact that getCapabilities() is not supported in Firefox. See the following browser compatibility tables:
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getSettings
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities

This PR works in desktop and mobile versions of Chrome, Firefox, and Safari.

Burndown

Before review

  • Updated CHANGELOG.md if necessary
  • Added unit tests if necessary
  • Updated affected documentation
  • Verified locally with npm test
  • Manually sanity tested running locally
  • Included screenshot as PR comment (if needed)
  • Ready for review

Before merge

  • Got one or more +1s
  • Re-tested if necessary

@timmydoza timmydoza merged commit 84a59ad into master May 21, 2021
@timmydoza timmydoza deleted the fix-firefox-audio branch May 21, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants