Re: [w3ctag/design-reviews] Gamepad Light Indicator extension API (#362)

> When can `setColor()`'s promise reject? Preliminary research suggests that the most obvious way to implement this underneath the hood would be raw HID messages, is the idea to reject when the device does not ACK? (I have to actually dig out a controller and see how this works, it's been quite a while since I've had to interact with a HID interface)

Hi Cynthia! that's correct, any failure at the gamepad device layer interacting with the OS calls will generate an error which result in the promise being rejected. Each supporting OS may have their particular APIs, but these failures are, for example, error to access logical and physical hardware joystick device information that results getting error instead of the os device_id for the joystick. On top of that, the implementation will also error when trying to set the color with invalid light index (for example, specifying an index beyond the max supported light -1).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/362#issuecomment-486342280

Received on Wednesday, 24 April 2019 17:25:23 UTC