navigator.getGamepads() returns an empty array

RESOLVED DUPLICATE of bug 1086255

Status

()

RESOLVED DUPLICATE of bug 1086255
3 years ago
3 years ago

People

(Reporter: seguets, Unassigned)

Tracking

37 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150402191859

Steps to reproduce:

Trying to get connected gamepads list :
gamepads = [] ;
function e_update_gamepads_list()
{
   gamepads = navigator.getGamepads();
   alert( gamepads.length );
}
e_update_gamepads_list();

window.addEventListener("gamepadconnected", function(e){ e_update_gamepads_list(); });

window.addEventListener("gamepaddisconnected", function(e){ e_update_gamepads_list(); });


Actual results:

navigator.getGamepads() returns an empty array of length 0, meaning that Firefox does not find my gamepad.


Expected results:

My usb gamepad should appear in the list. It does in Chrome, but not in Firefox.

Updated

3 years ago
Component: Untriaged → DOM: Device Interfaces

Comment 1

3 years ago
Similar to bug 1086255.
DiegoR, can you please install the following builds and tell me if either of these work?
* ftp://ftp.mozilla.org/pub/firefox/releases/31.0/win32/en-US/Firefox%20Setup%2031.0.exe
* ftp://ftp.mozilla.org/pub/firefox/releases/32.0/win32/en-US/Firefox%20Setup%2032.0.exe

If Firefox 31 works and Firefox 32 doesn't then this is probably a duplicate report of bug 1086255.
Flags: needinfo?(seguets)
QA Whiteboard: [triaged]
(Reporter)

Comment 3

3 years ago
You are right, it does work with build 31 and not with build 32.
(The mapping is wrong by the way, but this is another story.)
I did check with this http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

When reading bug 1086255 I thought it was only about events, while my gamepad was not detected at all, that is why I thought it was a different bug. But yes, it seems to be a duplicate, sorry for that.

Don't hesitate on asking if you want me to make other tests to help you fix this.
Flags: needinfo?(seguets)
Thank you for following up and for filing this issue, DiegoR. I think what we're looking at here is two different symptoms of the same root issue. I'm going to mark this as a dupe of bug 1086255. 

Please keep an eye on bug 1086255 to check if your issue is resolved once it's fixed. If not, you can feel free to reopen this bug report.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1086255
You need to log in before you can comment on or make changes to this bug.