WebHID API support

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

WebHID API support

Postby flash45 » Wed Dec 25, 2019 3:00 am

Chome 78+ allows access to the WebHID API. CEF lets us set this flag. when we add this runtime flag at runtime, we can access the WebHID API functions. But there's a problem. I want to show you an example; After running the code line "navigator.hid.requestDevice ({filters: []}" on CEF, no device pairing screen came up. If this screen fails, the devices cannot be paired. As a result, no WebHID API will work. When you run the line "let devices = navigator.hid.getDevices (). then ((data) => console.log (data))", an empty array will return because the devices are not paired.

Additional Information;
Chome also implements a device picker for granting HID device permissions. I understand that CEF isn't likely going to implement a UI for picking HID devices (similar to WebUSB and bluetooth). We would need a way to blanket authorize all connected HID devices so that we can retrieve them with the getDevices() function in the WebHID API. Normally the returned array is empty until the user has explicitly granted device permissions.

As a result; The WebHID API is not available in CEF because no device pairing screen came up. If we do not pair the device, the functions of this API are not available. Normally this screen should come or can grant blanket access for all HID devices. This needs to be implemented by CEF.
Posts: 2
Joined: Wed Dec 18, 2019 1:18 pm

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 13 guests