Firefox 56+ breaks Gamepad API across multiple windows/tabs
The application I am working on uses the Gamepad API to allow xbox controllers to be used to control video producing cameras. It supports multiple windows/tabs.
Everything worked great, but after upgrading from Firefox version 52 to 65 the controllers stopped working correctly when multiple pages were open. The update is necessary for video stability, so downgrading is not an option.
Worst case will update with the fixed Vesrion if Mozilla fixes the issue.
How to reproduce:
Running windows open Firefox version 56+
- Open https://html5gamepad.com/
- Connect a xbox controller (maybe any gamepad)
Observe that the controller is detected and that input on the gamepad is shown in the tester.
- Open a second window and navigate to https://html5gamepad.com/
Observe the at the controller is not detected Expected: The controller should be detected and inout should be shown in the tester.
If you downgrade below 56 or disable multiprocess using browser.tabs.remote.autostart
this issue is not seen.
What I do know / have tried:
- Have narrowed down the issue to Firefox version 56.0.0
- Can reproduce the issue consistently with https://html5gamepad.com/
- Can not reproduce with Chrome or Firefox 52
- Turning off
browser.tabs.remote.autostart
does remedy the issue, but again, this is necessary for video stability and overall performance. navigator.getGamepads
in the second window seems to return an empty list- Tracking ff issue https://bugzilla.mozilla.org/show_bug.cgi?id=1538805
- and ff issue https://bugzilla.mozilla.org/show_bug.cgi?id=1529850
- The issue is one per website
Before this is marked as a duplicate. I know this is a similar question as Is there a way to use the HTML5 Gamepad API with multiple windows or tabs in Firefox? but there has been no movement on that issue and it was very specific.
TLDR: FF v56+ with multiprocessing enabled breaks the Gamepad API when used in multiple windows. Any workarounds or fixes?