proposals icon indicating copy to clipboard operation
proposals copied to clipboard

Game Mode API

Open JeffreyBlanz opened this issue 5 months ago • 0 comments

Introduction

macOS, Windows, iOS, iPadOS, and Android have a OS game mode that prioritizes an application and enables other features such as doubling the bluetooth sampling rate.

Currently there is no way for browsers or web apps to access the OS Game Mode. This proposal is to allow web apps and browser games to use Game Mode.

Use Cases (Recommended)

  1. PWA Games
  2. Web Browser Games
  3. Cloud Gaming on the web or through PWAs.

Solution: Game Mode Permission API

In this API there will be a permission prompt for enabling the system game mode. When a website asks for Game Mode permission, the browser will popup a message asking the user for permission to use Game Mode. Upon approval the browser will enable the system game mode.

Note: The permission prompt will only work if it's a same-origin or permitted-origin (so ad banners can never request it).

Solution Sequence

  1. Webpage must ask for permission.
  2. If already running Game Mode then permission is automatically granted without popup (e.g. like fullscreen API request while already running fullscreen)
  3. If user denies game mode is not enabled, but can be changed in website settings later.

Example

A possible permission-request message could be: "Webpage is requesting permission to enable Game Mode. This may consume more battery power. Allow? Yes/No"

Privacy & Security Considerations

  • Battery consumption problems
  • Excessive permission requests
  • Annoying ad banners running at too high a frame rate

References

Apple: https://support.apple.com/en-us/105118 or https://developer.apple.com/documentation/bundleresources/information-property-list/lssupportsgamemode

Android: https://developer.android.com/games/optimize/adpf/gamemode/gamemode-api

Windows: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/gamemode/game-mode-portal

JeffreyBlanz avatar Jul 31 '25 17:07 JeffreyBlanz