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

Don't check mic permission on Firefox #3298

Merged
merged 5 commits into from
Aug 8, 2024
Merged

Don't check mic permission on Firefox #3298

merged 5 commits into from
Aug 8, 2024

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Aug 7, 2024

#3247 broke recording on Firefox:

Uncaught (in promise) TypeError: 'microphone' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName.

(See https://stackoverflow.com/questions/53147944/firefox-permission-name-member-of-permissiondescriptor-camera-is-not-a-vali)

This fix checks for permission on all non-Firefox browsers and assumes permission for Firefox.


This change is Reviewable

@imnasnainaec imnasnainaec added bug Something isn't working frontend audio labels Aug 7, 2024
@imnasnainaec imnasnainaec self-assigned this Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.59%. Comparing base (92050a5) to head (3e60889).
Report is 36 commits behind head on master.

Files with missing lines Patch % Lines
src/components/Pronunciations/Recorder.ts 0.00% 2 Missing ⚠️
src/components/Pronunciations/utilities.ts 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3298      +/-   ##
==========================================
- Coverage   74.59%   74.59%   -0.01%     
==========================================
  Files         279      279              
  Lines       10680    10687       +7     
  Branches     1287     1288       +1     
==========================================
+ Hits         7967     7972       +5     
- Misses       2351     2352       +1     
- Partials      362      363       +1     
Flag Coverage Δ
backend 83.87% <ø> (-0.03%) ⬇️
frontend 66.45% <66.66%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@imnasnainaec imnasnainaec changed the title Only check mic permission on Chrome (it errors on Firefox) Don't check mic permission on Firefox Aug 8, 2024
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 8c51260 into master Aug 8, 2024
19 checks passed
@imnasnainaec imnasnainaec deleted the mic-perm branch August 8, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio bug Something isn't working frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants