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


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?



You should probably try the HTML5 Gamepad API:


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


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!