question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

isDevicePermissionGranted should return something else than false when it can't detect permissions

See original GitHub issue

The method isDevicePermissionGranted on JitsiMeetJS.mediaDevices currently returns true or false when permission is granted or not.

Some browsers don’t support the required APIs (Safari…) and the method returns false all the time. So, if you planned to display a warning in case permission is not granted, it is always displayed on those browsers…

I’d like to suggest that the method should return a third value, null, when it can’t detect the permissions.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
saghulcommented, Aug 18, 2021

I’m afraid there is no way to know that in Firefox without trying. They don’t implement the “camera” and “microphone” permissions in the Permissions API: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API

1reaction
saghulcommented, Apr 8, 2021

Probably undefined makes more sense here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

returning user instead of True or False in Django Permission ...
As long as user is not empty it will return True . By default, an object is considered true unless its class defines...
Read more >
Jitsi - Bountysource
Before posting, I checked community.jitsi.org to see if the same or similar ... isDevicePermissionGranted should return something else than false when it ...
Read more >
lib-jitsi-meet API (low level) - GitHub Pages
isDevicePermissionGranted(type) - returns a Promise which resolves to true if user granted permission to media devices. type - 'audio', 'video' or undefined ....
Read more >
Permissions - W3C
The Permissions specification defines common infrastructure for other specifications that need to interact with browser permissions.
Read more >
Permissions - Directus Docs
What CRUD operation this permission rule applies to. ... permissions for a role other than the current user's role won't be returned.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found