Re: [w3c/gamepad] About the id (#65)

> Is there any guarantee that it is both unique(for all gamepads in the world) and immutable (for a given gamepad) ?

The `id` field is incredibly underspecified in general. It came from my original implementation in Firefox where I just wanted some way to expose the vendor and product IDs from the USB device. USB vendor IDs are managed by the USB group, but I've definitely seen the same chipset used in several different cheap USB gamepads with the exact same vendor+product IDs, so it's not a very strong guarantee.

As to immutability, that should always hold true, and we could add spec text to that effect. I'm wary of trying to really spec out the id field, I think it wasn't a great idea in the first place and we should probably just spec something where we can expose things like the vendor and product IDs as separate fields when they're available.

-- 
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/65#issuecomment-347283575

Received on Monday, 27 November 2017 18:47:01 UTC