Questions tagged [gamepad-api]

The Gamepad specification defines a low-level interface that represents gamepad devices.

The Gamepad specification defines a low-level interface that represents gamepad devices. The Web Gamepad API presents a way to access and use gamepads and other controllers for games. For more information see this: https://wiki.mozilla.org/GamepadAPI

78 questions
23
votes
4 answers

Is the HTML5 Gamepad API limited to only 4 Controllers?

I'm correctly able to get input from 4 controllers through using the HTML5 Gamepad API within a browser. https://www.w3.org/TR/gamepad/ What I'm having trouble with is getting input from 8 controllers. These being all Xbox 360 controllers, I know…
MattTreichel
  • 1,418
  • 3
  • 18
  • 35
20
votes
7 answers

Kinect in HTML5

Kinect for Windows has been just released on the 1st of February. Is there any good way to make it work with HTML5 games? Perhaps even somehow with the upcoming GamePad API...? Looking for ideas here, especially any with minimum extra installation…
AshleysBrain
  • 22,335
  • 15
  • 88
  • 124
19
votes
1 answer

How to detect joy-con input/motion controls in HTML5 JavaScript

I am trying to create an HTML5 JavaScript game that uses Nintendo Switch Joy-Cons and motion controls. The problem is, I don't know how to detect motion controls from Joy-Cons when they are connected to my PC. I've managed to achieve button inputs…
user10976548
11
votes
3 answers

Android and Guitar Hero controller

I know that the latest versions of Android (Honeycomb and ICS) have support for joysticks and gamepads. Guitar Hero (and Garage Band) controllers are essentially USB HID devices, right? So my question: Is that possible to receive data (button…
Evgeny Vinnik
  • 1,235
  • 2
  • 16
  • 27
10
votes
3 answers

HTML5 Gamepad API on Chrome

I'm using Chrome (Version 19.0.1084.46). I enabled the Gamepad API in chrome://flags. I plugged in some game pads, but navigator.webkitGamepads is always an array of length 4 containing only undefined. navigator.webkitGamepads GamepadList 0:…
Daniel X Moore
  • 14,637
  • 17
  • 80
  • 92
8
votes
1 answer

listen for gamepad connection and input

I would like to provide gamepad support for my web application. This application is a socket client (using socket.io) and it should also being able to deal with gamepad input. So when plugging in a gamepad via USB or Bluetooth I would like to fire…
Question3r
  • 2,166
  • 19
  • 100
  • 200
6
votes
1 answer

Android: enumerating the buttons on a gamepad

I have an Android device into which a gamepad can be connected (it's a totally standard XBox 360 controller, but I need to support other varieties as well). The gamepad is showing up as a InputDevice with some analogue axes and some buttons. I need…
David Given
  • 13,277
  • 9
  • 76
  • 123
5
votes
1 answer

Rumble support with Gamepads?

I have read through both the MDN Gamepad API page and the W3C Gamepad API page, and I have found nothing about any rumble features with Gamepads. I found one page that referenced rumble support in FireFox with an android phone, but only had one…
ZomoXYZ
  • 1,763
  • 21
  • 44
4
votes
0 answers

HTML5 Gamepad API on Android Chrome

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…
dkniffin
  • 1,295
  • 16
  • 25
4
votes
2 answers

What is the optimum gamepad polling frequency?

I am polling Gamepad in js using a 250ms timer to switch between 4 different viewpoints. However this value is still too high to guarantee seeing every button press. I have noticed that if a button is depressed and released too quickly (i.e., <…
4
votes
0 answers

android gamepad background service

My friends and I are trying to use android gamepad key presses to trigger phone calls. We want this to work even if the device is asleep. What would be the appropriate manner to approach this? I have found android.view.InputDevice and KeyEvent…
mlihp
  • 485
  • 4
  • 12
3
votes
1 answer

Simulate gamepad with Puppeteer?

I'd like to write some Puppeteer-based tests to test some logic that makes use of the Gamepad API, but I can't find any documentation on the Puppeteer docs that explain how to simulate a gamepad and how to send button presses to the browser. What's…
Fez Vrasta
  • 14,110
  • 21
  • 98
  • 160
3
votes
1 answer

Is it possible to register a custom gamepad in javascript with the Gamepad API?

Quick background I am currently working on a VR application with A-frame to showcase VR hardware. We use custom controllers that connects through websocket/bluetooth and would like to make them compatible with the tracked-controls. Those A-Frame…
WilBros
  • 31
  • 1
3
votes
1 answer

HTML5 gamepad API issues (on Mac)

I'm curious if anyone out there has been able to connect to the gamepad API with either a wireless xbox360 controller or a bluetooth PS3 controller on a Mac. As you can see below, I have both controllers connected and get nothing showing in the…
stagl
  • 501
  • 3
  • 18
3
votes
2 answers

JInput doesn't update / refresh

I'm using JInput for Gamepad control on Win7 64bit. I ran into a problem: Once I get the DefaultEnvironment the controller list doesn't get updated or refreshed. for (Controller c :…
atx
  • 266
  • 3
  • 15
1
2 3 4 5 6