Repository navigation
Description
Description
MDN: Gamepad API, Pointer Lock API, Screen Orientation API
Specifications: Gamepad API, Pointer Lock API, Screen Orientation API
Games need reliable input APIs. Gamepad API and Pointer Lock API support are critically important for gaming on the web, especially for cloud gaming. Screen Orientation API, especially orientation locking, is important for gaming on mobile devices where orientation changes can disrupt gameplay.
Tasks:
- Fix Gamepad API failing tests (excluding idlharness-extensions.https.window.html)
- Fix Pointer Lock API failing tests
- Update test environments for Chromium, Firefox, and Safari to enable Screen Orientation API locking tests to pass on wpt.fyi. Currently these tests fail when run on hosts that do not support screen orientation locking.
Specification
Gamepad API, Pointer Lock API, Screen Orientation API are all Working Draft stage standards-track specifications in WebApps WG
Additional Signals
This proposal is primarily driven by feedback from web platform developers regarding a use case (gaming) which is currently too niche to rank highly on surveys. Cloud gaming operators are heavily impacted by breakage in these APIs and have highlighted the need for better testing and interoperability.
The scope for this proposal is limited to fixing the existing failing tests, but is intended as as first step toward addressing the larger issue of poor test coverage. Automated testing is limited as testing most of the API surface would require implementing new test APIs to simulate connected peripherals (gamepads) or system capabilities (pointer locking, screen orientation locking). These test automation APIs should be implemented and new tests should be written in order to continue making progress on this focus area in future Interop iterations. Specifying new test APIs requires standards work and is out of scope for Interop, but can be pursued in parallel with this proposal.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rejhgadellaa commentedon Oct 7, 2024
I think it's worth mentioning the Fullscreen API here. With regards to support on iOS Safari, MDN reports:
Also see: https://webventures.rejh.nl/blog/2024/history-of-safari-show-stoppers/#anchor--2020-add-fullscreen-api-to-ios-display-fullscreen
Update: There is a separate Interop proposal for the FS API
evanjacover commentedon Oct 7, 2024
As we explore cloud gaming at Jackbox Games, these features do become more critical. We are currently taking the approach of limiting the browsers we support based on some of these features, especially screen orientation.
AshleyScirra commentedon Oct 7, 2024
Many of the mentioned features are useful for web games made in Construct so we generally support this, but especially gamepad. In particular it would be useful to have good support for button and axis events (see w3c/gamepad#152)
shalanah commentedon Oct 7, 2024
Related Proposals:
xingri commentedon Oct 8, 2024
We, NVIDIA Geforce Now cloud gaming, strongly agree with the current proposal and wish to participate in activities that improve the compatibility and interoperability of APIs for cloud gaming on the web.
As an example of cloud gaming's reliance on the Pointer Lock API, all cloud gaming providers experienced a surge in crash issues last July, as shown in this Reddit post. This tracking issue explains the root cause.
Beyond unexpected crashes described above, the Pointer Lock API also suffers from compatibility issues across different browsers, as described in this bug report.
We also advocate for better coverage and cross-browser compatibility for Gamepad APIs, as outlined in the issue.
These examples highlight the very real challenges faced by developers and users due to inconsistencies and shortcomings in key web gaming APIs. Addressing these issues within Interop 2025 is crucial for the continued growth and success of web gaming.
marcoscaceres commentedon Oct 8, 2024
Not sure if it's a stretch, but adding Screen Wake Lock into the mix might be good too. Agree that Fullscreen is pretty fundamental to all these, but could be handled by #732.
AshleyScirra commentedon Oct 9, 2024
Also note following Chromium bugs involving Pointer Lock:
gsnedders commentedon Dec 5, 2024
At least in the case of macOS, I'm pretty sure there is no concept of any orientation lock, for example, thus there's not really any way to update the test environment to achieve that. I don't know what the status quo for GNOME/Wayland or Windows is? (And changing to iOS doesn't seem like "updating" the test environment — that's a totally different test environment.)
wpt-interop commentedon Feb 13, 2025
Thank you for proposing Improving gaming on the web for inclusion in Interop 2025.
We are pleased to let you know that this proposal was accepted as part of the Gaming investigation area. You can follow the progress of this investigation area on the Interop 2025 dashboard.
For an overview of our process, see proposal selection. Thank you for contributing to Interop 2025!
Posted on behalf of the Interop team.
AshleyScirra commentedon Feb 14, 2025
It looks like the investigation area is for the "Gamepad API testing" only. This proposal was a bit broader including Pointer Lock and Screen Orientation.
foolip commentedon Feb 17, 2025
Updated labels to reflect that this was accepted as an investigation area.
@AshleyScirra I think you're correct that it's not the whole scope suggested, the Gamepad API is the part that we had enough support for.
The next step here will be to create a repo for the investigation and define a roadmap.
foolip commentedon Feb 20, 2025
I have now created https://github.com/web-platform-tests/interop-gamepad. Thanks to @nondebug for agreeing to lead the investigation!