Re: [w3c/gamepad] id field in gamepad might have a persistent identifier? (#73)

Exposing vendor/product ID as (integer) fields would be a major help for developers who are trying to support device-specific gamepad features and calibration. For instance, some gamepads have buttons not represented by the Standard Gamepad spec, and using them effectively usually requires identifying the gamepad model to understand how the buttons are positioned and labeled.

One issue is that these IDs aren't available for all APIs. XInput on Windows makes it difficult to identify specific devices, and as a result many browsers report any XInput device as a generic Xbox 360 controller. This makes it difficult to give (e.g.) Xbox One-specific button prompts when the user has an Xbox One controller.

Some devices have multiple vendor/product IDs but should be treated as a single device, and it's not always obvious which ID pair is the most appropriate:

* Two Joy-Cons should show up as independent Bluetooth devices when used separately, but it would be equally valid to map them as a single Gamepad when they are used with the grip attachment.
* A gamepad connected with a wireless receiver could use the product ID for the receiver or the gamepad itself.
* A gamepad could be connected over multiple interfaces at the same time (USB + Bluetooth, USB + Dongle), reporting different IDs on each.

In principle, vendor/product IDs could still expose personally identifiable information if the device chooses its own ID or is an extremely rare device. To avoid revealing too much information, perhaps the vendor/product IDs should only be exposed when the IDs are present in a whitelist of known devices.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/73#issuecomment-393976899

Received on Friday, 1 June 2018 18:53:18 UTC