Gamepad API not working in Chrome

Hi, I need to use a gamepad in a PlayCanvas project.
In fact, I have all the code implemented based on this project https://playcanvas.com/project/381404/overview/gamepad-controller-test and it does not work in Chrome for Android, but works in Firefox for Android.

Strangely enough, an HTML5 Gamepad test
https://html5gamepad.com/ does work in Chrome for Android. Therefore, I am starting to beleive that there might be some kind of problem with the Gamepad support in PlayCanvas.

Chrome supports the Gamepad API (as the HTML5 test shows) but the gamepad does not work in PlayCanvas with Chrome.

I use the latest Chrome version (73.0).
I really really need to make it work in Chrome, so any help would be welcome.

That’s a really old project.

As far as I know, there isn’t a recent gamepad sample project that you can test with but it shouldn’t take long quickly create one.

It was working not long ago, and as far as I know, it uses the Gamepad API, which has not changed. Therefore, it should work. What part of the project is supposed to fail because it’s too old?

In any case, if someone has a Gamepad test project that I can try, it could be useful.

As far as I can tell, it doesn’t go through the application’s instance of the gamepad class (this.app.gamepads) so perhaps the events have been hooked up differently.

So, I should fork the gamepad test project and change what part??
I don’t have a deep knowledge of the way the events are treated in the PlayCanvas with respect to the gamepad.

Just whipped this together: https://playcanvas.com/editor/scene/742878

Works for me on Android and Chrome 73 (Samsung S7 with 8bitdo FC30 controller)

Thanks!
I’ll give it a try.

It seems it’s solved.
Thanks