How to read a USB game controller in a Web Browser?


#1

From my browser, streaming video from my new robot rover, I’d like to read input from an old USB game controller, and do something with that.

It’s only the reading of the game controller inputs locally that I’m concerned with. If I can get some data in, maybe with JavaScript, then the rest is a walk in the park.

Any clues, or perhaps even helpful links, Anyone?

Regards,
M.


#2

You should probably try the HTML5 Gamepad API:


#3

Speaking of Mozilla, maybe these forum categories would be some help


#4

Thanks Alexandre,

Yep, eventually managed to find that, but had inordinate trouble figuring out, subsequently, how to delete my original post.

In any case, thanks for the greatly appreciated response and links.

Now all I need is a slightly more contemporary gamepad, one that will work with APIs developed this century!

Regards,
M.