mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
645 stars 69 forks source link

Gamepad API Trigger-Rumble Haptics Extension #656

Open gabrielsanbrito opened 2 years ago

gabrielsanbrito commented 2 years ago

Request for Mozilla Position on an Emerging Web Specification

Other information

We would like to extend the GamepadHapticActuator interface to expose the trigger-rumble capability in the Web for compatible gamepads. Chrome Status entry: https://chromestatus.com/feature/5162940951953408

tomrittervg commented 2 years ago

(no hats) This will expose a new property of hardware, so there should be a fingerprinting note, no? I think Gamepad details are gated on user input or user interaction in some way?

gabrielsanbrito commented 2 years ago

@tomrittervg thanks for pointing this out. I have added a "privacy considerations" section to the explainer. Regarding your question, yes. You are correct. navigator.getGamepads method returns an empty list before a gamepad user gesture has been detected. Only after that websites will be able to query for the gamepad's haptic capabilities.