Re: [w3c/gamepad] extensions: Add vibrationActuator and dual-rumble effect (PR #163)

@marcoscaceres commented on this pull request.



> +            </li>
+            <li>[=Queue a global task=] on the [=relevant global object=] of
+            |actuator| using the [=gamepad task source=] to run the following
+            steps:
+              <ol>
+                <li>[=Resolve=]
+                |actuator|.{{GamepadHapticActuator/[[playingEffectPromise]]}}
+                with {{GamepadHapticsResult/"preempted"}}.
+                </li>
+                <li>Set
+                |actuator|.{{GamepadHapticActuator/[[playingEffectPromise]]}}
+                to `undefined`.
+                </li>
+              </ol>
+            </li>
+            <li>[=Stop haptic effects=] on |actuator|.

See above... this should probably first stop the effects, get IPC confirmation, and then resolve `playingEffectPromise` with "preempted". Otherwise, this will be racy (stopping the effects might take longer than resolving the promise).  

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/163#pullrequestreview-1016451676
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/pull/163/review/1016451676@github.com>

Received on Thursday, 23 June 2022 06:29:27 UTC