WebHID Capabilities

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 Capabilities

Postby mMoo » Fri Mar 17, 2023 10:25 am

We are interested in getting WebHID functionality up and running with our desktop app that is built with CEF. I have seen on other posts that this should be possible out of the box when using Chromium Runtime over Alloy but that didn't seem to be the case when we tried. We did get a build running while using Chromium Runtime and it did have some prompts I would expect when using Chrome browser (such as saving a password and such) but nothing for WebHID (such as selecting the devices from the dropdown) which then prevents call controls if proper permissions are not granted. Someone on our end had attempted to add in code that would just have a blanket allow for things like this. That change in conjunction with running in Chromium Runtime still did not seem to work as expected.

So I'm wondering what the proper approach and setup is to get WebHID working with a desktop application, if at all possible? I'm sorry if this was posted and answered elsewhere. If others have found a good approach or have some resources to read up on, it would be greatly appreciated. Thank you all in advance.
mMoo
Newbie
 
Posts: 2
Joined: Fri Mar 17, 2023 10:03 am

Re: WebHID Capabilities

Postby magreenblatt » Fri Mar 17, 2023 11:10 am

You may be the first to test this functionality. You can debug the Chromium code using a local debug build. Related WebHID docs are linked from https://chromestatus.com/feature/5172464636133376
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: WebHID Capabilities

Postby magreenblatt » Fri Mar 17, 2023 11:14 am

You should also try with “cefsimple --enable-chrome-runtime” which shows the complete Chrome UI, and a vanilla Chromium (non-Google branded) build in case it depends on some Google-specific configuration.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: WebHID Capabilities

Postby mMoo » Tue Mar 21, 2023 10:29 am

Hi Marshall, thank you for responding to the post!

We took a look at some of the packages on the automated builds page, specifically the Sample Application one. This one contained cefclient but didn't seem to have a sign of cefsimple. However, after getting cefclient to run with the --enable-chrome-runtime flag I did manage to see some WebHID functionality which was great but this didn't come out of the box. Interestingly, cefclient wasn't able to recognize any of the devices I had plugged in. I opened the settings page for Chrome still within the test application and this opened a new window and icon on my taskbar. When I right clicked the icon, it was read as a Chromium Embedded Framework Application (or something along those lines) but now it recognized my devices and allowed me to use WebHID. So I wasn't sure if opening the Chrome settings page simply opened a Chrome window or if it was still a cefclient window.

We also wanted to test cefsimple to see if the behavior was the same. I followed along to some instructions and at the end of it, I did have a minimal.exe which I ran and it did boot up a Chrome page but the same issue as before showed up again where my devices weren't being recognized. This time, however, I wasn't able to open a Chrome settings page as that portion of the page was not longer present.

Just wanted to get your insight on some of this. Perhaps I set things up wrong.

Thank you
mMoo
Newbie
 
Posts: 2
Joined: Fri Mar 17, 2023 10:03 am

Re: WebHID Capabilities

Postby magreenblatt » Mon Mar 27, 2023 10:57 am

You can build cefsimple from the “Standard Distribution” on the downloads page.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 30 guests