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

Add example of using permission api #111

Open
scheib opened this issue Nov 16, 2017 · 5 comments
Open

Add example of using permission api #111

scheib opened this issue Nov 16, 2017 · 5 comments

Comments

@scheib
Copy link
Collaborator

scheib commented Nov 16, 2017

No description provided.

@karelbilek
Copy link

I tried this, but I got only errors

await navigator.permissions.query({name:'usb', filters: []})

@karelbilek
Copy link

The error is as follows:

Uncaught (in promise) TypeError: Failed to read the 'query' property from 'Permissions': The provided value 'usb' is not a valid enum value of type PermissionName.

@reillyeon
Copy link
Collaborator

Chrome does not yet support WebUSB in the permissions API. This is tracked by Chromium issue 638721.

@jogshraddha
Copy link

Hi.. is this still not supported by chrome? I am trying to use web usb but when I call device.open it throws me "Access denied" error. any suggestions will be appreciated. Thanks

@odejesush
Copy link
Collaborator

Hi @jogshraddha, WebUSB is enabled by default on Chrome since 61. There are a couple of reasons that may be producing this error. The first is that the origin does not have permission to open the USB device. This can happen on Android if the device has revoked access to the USB device. The second reason is that Chrome failed to grab the device handle. If you are still unable to open the device, please file a bug report at https://crbug.com/ with details on how to reproduce the issue. I hope that this helps.

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

No branches or pull requests

5 participants