4

I'm trying to gauge the feasibility of an idea I have for a game. I'd like to make the game as a web app (or possibly a PWA), with support for a controller/gamepad, and usable on mobile browswers (eg Android Chrome).

To see if this is possible, I'm trying to connect an Xbox One S controller I have via bluetooth, and test it with http://html5gamepad.com/. When I connect the controller to my computer and try it, the controller is picked up just fine. However, when I connect it to my Android phone (Pixel 3), and visit that site in the Chrome (71.0.3578.98) browser, it does not recognize the device at all.

I also tested this with a small html & javascript page served up via express and available over ngrok, using window.addEventListener("gamepadconnected", ...) and navigator.getGamepads() as my test, but that isn't recognizing it either.

I also tested with another phone (Samsung Galaxy Note 3), and experienced the same behavior.

The controller is definitely connected to my phone, because I can use it to navigate around my home screen, and I can even move between web pages in the browser, but it seems like the events are not passed to the page for some reason.

Update: I just tried this on Firefox on my phone and it worked, so I guess maybe I'll submit a bug report to Android Chrome's buglist, if that's publicly available.

Update 2: https://bugs.chromium.org/p/chromium/issues/detail?id=916104&can=2&q=OS%3DAndroid%20component%3ABlink%3EGamepadAPI%20&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified

dkniffin
  • 1,295
  • 16
  • 25
  • 1
    Thank you for filing a bug with chrome. Came across this issue when developing my Gamepad API: https://github.com/torch2424/responsive-gamepad , and thought it was something on my end. Was delighted to see it's a chrome bug, and I'm not crazy haha! – Torch2424 Jan 23 '19 at 08:46
  • Just to close the loop on this, the filed bug was merged into this [bug](https://bugs.chromium.org/p/chromium/issues/detail?id=906347), which is fixed. Happy gaming! – DenverCoder9 Dec 16 '20 at 11:31

0 Answers0