[web][camera] Fix permissions check in Firefox (#22855)# Why As described in #19485, the current logic for checking camera/microphone permissions does not work in Firefox and leads to a `TypeErr
[web][camera] Fix permissions check in Firefox (#22855)# Why As described in #19485, the current logic for checking camera/microphone permissions does not work in Firefox and leads to a `TypeError` being thrown, as it is not considered a valid permission to check for. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How <!-- How did you build this feature or fix this bug and why? --> I've fixed this by catching the `TypeError` and returning an undetermined status, so the requesting application can then request permission accordingly. # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> I added a unit test that ensures that we return an undetermined status whenever a `TypeError` is thrown while checking for permissions. # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
show more ...