[feat] webhid API #14550
Replies: 8 comments
-
|
These are chromium-only apis, and are not supported on other webwiev engines which are used by tauri. A possible workaround would be using rust usb library. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I'm also interest in getting this feature implemented. Can't it be guarded behind some kind if feature flag, and exit the build process if the webview engine isn't supported? |
Beta Was this translation helpful? Give feedback.
-
|
+1 @k26pl when you say:
Is there another way of doing this if the HID isn't USD connected? Like for example an integrated laser scanner. |
Beta Was this translation helpful? Give feedback.
-
|
The hid object is exposed by the navigator object in the Tauri WebView.
Is HID support already available in the latest WebView2 version in Tauri on Windows? |
Beta Was this translation helpful? Give feedback.
-
|
yes, and probably always was since the windows webview is based on chromium. this issue really is about the other platforms, that just wasn't specified. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the information. |
Beta Was this translation helpful? Give feedback.
-
I'm not aware of any restrictions compared to any other chromium based browser.
Yep, same for Firefox btw https://mozilla.github.io/standards-positions/#webhid |
Beta Was this translation helpful? Give feedback.
-
|
Correct me if I'm wrong but it sounds like we might have a solution in https://github.com/RedfernElec/tauri-plugin-hid ? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem
Electron has APIs for device accessing, like webhid/webusb/webserial. I cannot find any equivalent in tauri. Electron also provides a way to skip the popup to grant access of the device.
reference: https://www.electronjs.org/docs/latest/tutorial/devices#webhid-api
Describe the solution you'd like
Add same APIs
Alternatives considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions