Closed
Bug 878828
Opened 11 years ago
Closed 11 years ago
finalize and enable Gamepad API
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
VERIFIED
FIXED
mozilla28
People
(Reporter: vlad, Assigned: ted)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, feature, Whiteboard: [games:p1])
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
smaug
:
superreview+
|
Details | Diff | Splinter Review |
We need to finalize the Gamepad API and get it enabled everywhere. We're close, but there's a mess currently.
Assignee | ||
Comment 1•11 years ago
|
||
I have a bunch of outstanding patches and spec work I need to finish up. In no particular order, here are the ones I can remember off the top of my head:
Patches:
bug 851547 - make Gamepad API preffable. Waiting on a patch from smaug so that it can make the event types not visible to content
bug 860413 - allow setting standard mapping
bug 860409 - Allow passing both an analog and digital value for buttons
bug 690937 - XInput backend for Windows
(unfiled) - hook up gamepad mappings from a static list
Spec work:
* Figure out how to expose analog+digital buttons
* Figure out how to expose button names
* Spec buttonpress/release events
* https://www.w3.org/Bugs/Public/show_bug.cgi?id=21434 - Spec liveness of Gamepad objects
* Might want to change spec to use navigator.gamepads.get() instead of navigator.getGamepads()
Comment 3•11 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #1)
> bug 851547 - make Gamepad API preffable. Waiting on a patch from smaug so
> that it can make the event types not visible to content
My patch to let generated events to use webidl is still waiting for review.
Assignee | ||
Comment 4•11 years ago
|
||
bug 690935 is navigator.getGamepads().
Assignee | ||
Comment 5•11 years ago
|
||
I buckled down and got a bunch of those landed. We can ship it preffed off in 24 now, which is an improvement (since people can actually test it in release builds).
I'd still like to get XInput landed, and there's another bug (maybe not filed) about how we don't currently notice DirectInput devices being connected or disconnected on Windows that we really ought to fix.
I would like to get a few of those spec issues nailed down before we commit to shipping it preffed on.
Comment 6•11 years ago
|
||
Is this still shipping prefed off in 24?
Assignee | ||
Comment 7•11 years ago
|
||
Yes, it's behind the dom.gamepad.enabled pref.
Updated•11 years ago
|
Blocks: gecko-games
Comment 8•11 years ago
|
||
Shouldnt this be added to the release notes? Aurora release notes does not currently display this:
http://www.mozilla.org/en-US/firefox/24.0a2/auroranotes/
Assignee | ||
Comment 9•11 years ago
|
||
It's behind a pref at the moment, but we could relnote it.
Comment 10•11 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #1)
> bug 690937 - XInput backend for Windows
> (unfiled) - hook up gamepad mappings from a static list
These are not in the dependancy list (others as well, but they're fixed now). Can somebody add them, please (and file the missing bug)?
Also, are there still changes expected for the API (i.e. how stable is the API)? I'm asking because of Bug 802882 and I may file a bug for HTML5Test.com to exclude the API from the current (upcoming) set of tests (at least exclude it from counting towards the total score).
Assignee | ||
Comment 11•11 years ago
|
||
The two open blockers are the only things we need to fix to ship this. Anything else is just gravy.
Depends on: 926091
Assignee | ||
Comment 12•11 years ago
|
||
I landed a patch for 936104, so I think I'd be pretty comfortable with enabling the Gamepad API by default in Firefox 28.
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Florian Bender from comment #10)
> Also, are there still changes expected for the API (i.e. how stable is the
> API)? I'm asking because of Bug 802882 and I may file a bug for
> HTML5Test.com to exclude the API from the current (upcoming) set of tests
> (at least exclude it from counting towards the total score).
bug 926091 was the last breaking change I intend to make to the spec, it changed Gamepad.buttons[] to be an array of GamepadButton instead of just double. Any future spec changes should be backwards-compatible.
Assignee | ||
Comment 14•11 years ago
|
||
Here's the simple patch that enables the Gamepad API by default.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ted
Status: NEW → ASSIGNED
Assignee | ||
Comment 15•11 years ago
|
||
I posted an intent to ship message to dev.platform:
https://groups.google.com/forum/#!topic/mozilla.dev.platform/JjuTCr2VYUA
Assignee | ||
Comment 16•11 years ago
|
||
Comment on attachment 8343701 [details] [diff] [review]
Enable Gamepad API by default
smaug suggested that this might want a superreview? I'm not sure what the current policy is.
Attachment #8343701 -
Flags: review?(bugs)
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 18•11 years ago
|
||
Comment on attachment 8343701 [details] [diff] [review]
Enable Gamepad API by default
I was thinking this kind of sr :)
As far as I know, we could enable the API.
Attachment #8343701 -
Flags: superreview+
Attachment #8343701 -
Flags: review?(bugs)
Attachment #8343701 -
Flags: review+
Assignee | ||
Comment 19•11 years ago
|
||
Comment 20•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment 21•11 years ago
|
||
We already have this:
https://developer.mozilla.org/en-US/docs/API/Gamepad/Using_Gamepad_API
Not sure how up to date it is.
Assignee | ||
Comment 22•11 years ago
|
||
It's a bit out of date, but it could be fixed to be useful. The events are now just "gamepadconnected" and "gamepaddisconnected". The button/axis events are not currently in the spec. The Gamepad object has a few more properties, and the buttons property is slightly different. The whole "DOM implementation" section is no longer accurate (and of questionable utility anyway).
You can refer to the latest editor's draft of the spec for more:
https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html
Assignee | ||
Comment 23•11 years ago
|
||
I also have a draft Hacks article that's 95% complete that we should be publishing this week.
Comment 24•11 years ago
|
||
Thanks for the info Ted; I'll start working on the guide update and API reference pages for this straight away.
For testing purposes, I've found out my old PS2 controller, and now I'm guessing I just need to buy a PS2 -> USB adaptor. None of them mention Mac support - will they 'just work' on Mac? Are some of them better than others?
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #22)
> It's a bit out of date, but it could be fixed to be useful. The events are
> now just "gamepadconnected" and "gamepaddisconnected". The button/axis
> events are not currently in the spec. The Gamepad object has a few more
> properties, and the buttons property is slightly different. The whole "DOM
> implementation" section is no longer accurate (and of questionable utility
> anyway).
>
> You can refer to the latest editor's draft of the spec for more:
> https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html
Assignee | ||
Comment 25•11 years ago
|
||
Almost any USB controller will "just work" on Mac, Windows or Linux. The biggest current exception is the PS3 DualShock 3 controller, which doesn't have a driver for Windows, and may not work out of the box on Mac. Wired Xbox 360 controllers work fine everywhere, wireless ones need an adapter (that you can still buy but isn't manufactured anymore, AFAIK). Any dirt-cheap USB gamepad you can buy anywhere has a high probability of working fine.
Comment 26•11 years ago
|
||
I have updated the Gamepad API guide to be more up to date:
https://developer.mozilla.org/en-US/docs/Web/Guide/API/Gamepad
Quite a bit of it is stolen out of your MDN article, because the examples there are very concise and nicely written ;-) My PS2 controller was giving some funny results, but I think it might be slightly dodgy; I have ordered a new Wired XBox 360 controller so I can do a comparison and check what's going on.
Let me know if these is anything obviously wrong. I'll be adding some more examples soon.
Next step will be to create a proper API reference. I'll keep going.
Comment 27•11 years ago
|
||
Draft landing page for the whole API:
https://developer.mozilla.org/en-US/docs/Gamepad
Comment 28•11 years ago
|
||
Tested Gamepad feature for pre-beta sign off on latest Aurora (Build ID: 20140122004004) on: Windows 7 64bit, Windows XP 64bit, Mac OSX 10.9 and Ubuntu 13.10 32bit.
Status: RESOLVED → VERIFIED
QA Contact: alexandra.lucinet
Updated•11 years ago
|
Comment 29•11 years ago
|
||
Updating status flags as per:
http://hg.mozilla.org/releases/mozilla-release/file/c6c843644fbf
status-firefox28:
--- → disabled
status-firefox29:
--- → fixed
Comment 30•11 years ago
|
||
(In reply to Anthony Hughes, QA Mentor (:ashughes) from comment #29)
> Updating status flags as per:
> http://hg.mozilla.org/releases/mozilla-release/file/c6c843644fbf
Not sure whether relnote should be changed in kind.
Flags: needinfo?(lsblakk)
Comment 31•11 years ago
|
||
Gamepad API reference docs need a technical review:
https://developer.mozilla.org/en-US/docs/Gamepad
Could someone check these out for me? thanks in advance ;-)
Comment 32•11 years ago
|
||
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0
Gamepad API is properly disabled on Firefox 28 RC (Build ID: 20140310174439): dom.gamepad.enabled is set to false by default.
Comment 33•11 years ago
|
||
We're going to remove the Gamepad API note as it has been disabled, so this will go back to FF29
Flags: needinfo?(lsblakk)
Updated•10 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•