Contact emails
sco...@chromium.org, baj...@chromium.org
Spec
https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html
Summary
The Gamepad API exposes input from gamepad, joystick and other similar devices. It is currently exposed with the webkit prefix.
Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Android support is in progress. There are currently two conflicting CLs that add support on Android: https://codereview.chromium.org/133943002/ and https://codereview.chromium.org/165483003.
Yes for all other platforms.
Demo link
Compatibility Risk
The latest spec has a backwards-incompatible difference with our current implementation: The spec defines the "buttons" member as an array of GamepadButton objects, which contains a "pressed" boolean and "value" float. The current implementation, based on an older spec, exposes the buttons as an array of floats. Many current sites assume the older format of the buttons array.
Firefox 28 will launch with getGamepad enabled by default, and will adhere to the most recent spec (using GamepadButton instead of floats).
In order to prevent breaking existing sites we are planning on leaving the prefixed version of the API (navigator.webkitGetGamepads) as-is, returning buttons as an array of floats. The non-prefixed version of the API will expose the standard version of the Gamepad object, which will be compatible with Firefox's implementation. This allows developers to make compatibility changes when they update their code to use the non-prefixed function.
OWP launch tracking bug?
There isn't one currently.
Link to entry on the feature dashboard
http://www.chromestatus.com/features/5118776383111168On Thu, Feb 27, 2014 at 4:42 PM, Brandon Jones <baj...@chromium.org> wrote:
Contact emails
sco...@chromium.org, baj...@chromium.org
Spec
https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html
Summary
The Gamepad API exposes input from gamepad, joystick and other similar devices. It is currently exposed with the webkit prefix.
Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Android support is in progress. There are currently two conflicting CLs that add support on Android: https://codereview.chromium.org/133943002/ and https://codereview.chromium.org/165483003.
Yes for all other platforms.
Demo link
Compatibility Risk
The latest spec has a backwards-incompatible difference with our current implementation: The spec defines the "buttons" member as an array of GamepadButton objects, which contains a "pressed" boolean and "value" float. The current implementation, based on an older spec, exposes the buttons as an array of floats. Many current sites assume the older format of the buttons array.
Can we deprecate the prefixed version at the same time? We can recommend that developers switch to the unprefixed version in the console message.
I'm excited to see this on the web. A few questions:
1. Editors Draft seems rather early in the standards process to ship
this. But if our implementation agrees with another browser's, that's
more important.
2. Odd to have a "mapping" attribute and have it have only one value.
I guess the current expectation is that folks with re-map their
controller buttons at the system/browser level instead of in the web
app?
3. Why "getGamepads" instead of "gamepads"? Is that an attempt to
indicate that it's not a live list?
4. There are a lot of options modern game-pads provide which are not
exposed via this API. I presume those are considered for some later
version?
I'm excited to see this on the web. A few questions:
1. Editors Draft seems rather early in the standards process to ship
this. But if our implementation agrees with another browser's, that's
more important.
2. Odd to have a "mapping" attribute and have it have only one value.
I guess the current expectation is that folks with re-map their
controller buttons at the system/browser level instead of in the web
app?
3. Why "getGamepads" instead of "gamepads"? Is that an attempt to
indicate that it's not a live list?
4. There are a lot of options modern game-pads provide which are not
exposed via this API. I presume those are considered for some later
version?
LGTM to match what FF is shipping with M28. Please
deprecate/use-count the webkit version and remove it asap.