- From: Matt Reynolds <notifications@github.com>
- Date: Wed, 24 Jul 2024 16:36:07 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/issues/211/2249065161@github.com>
[Gamepad Extensions](https://w3c.github.io/gamepad/extensions.html) defines a [GamepadPose](https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface) interface, but as far as I'm aware it was never implemented in any browser engine. It was proposed as a way to expose motion inputs for WebXR API but WebXR maintainers ultimately decided to create their own interface. I think we should not add GamepadPose to Gamepad API as it is today. Currently, Gamepad API doesn't prompt the user before exposing access to gamepads. Instead, the API returns no information about gamepads until a [gamepad user gesture](https://w3c.github.io/gamepad/#dfn-gamepad-user-gesture) is received. This works well enough for legacy gamepads which typically don't generate any inputs unless the user is physically interacting with the device, but modern gamepads include sensors that continuously generate inputs until the device is disconnected. I think users would not expect a website to have continuous access to gamepad motion inputs just because they pressed a button on a gamepad, so some additional user consent step is needed. Other web platform APIs already expose access to motion sensors, we should try to leverage these APIs instead of building new gamepad-specific interfaces: * [Gyroscope API](https://www.w3.org/TR/gyroscope/) * [Accelerometer API](https://www.w3.org/TR/accelerometer/) (Accelerometer, LinearAccelerationSensor, GravitySensor) Chromium implements a motion sensors site permission (chrome://settings/content/sensors), perhaps we can gate gamepad motion inputs on that permission. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/gamepad/issues/211#issuecomment-2249065161 You are receiving this because you are subscribed to this thread. Message ID: <w3c/gamepad/issues/211/2249065161@github.com>
Received on Wednesday, 24 July 2024 23:36:11 UTC