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

@marcoscaceres commented on this pull request.



> +        <dt>
+          <dfn>playEffect()</dfn> method
+        </dt>
+        <dd>
+          <p>
+            The {{GamepadHapticActuator/playEffect()}} method steps are:
+          </p>
+          <ol>
+            <li>If |params:GamepadEffectParameters| does not describe a [=valid
+            effect=] of type |type:GamepadHapticEffectType|, return [=a promise
+            resolved with=] {{GamepadHapticsResult/"invalid-parameter"}}.
+            </li>
+            <li>Let |document| be the [=current settings object=]'s [=relevant
+            global object=]'s [=associated `Document`=].
+            </li>
+            <li>If |document| is `null` or |document| is not [=Document/fully

Understood. The case here feels different because this step is happening as a result of an explicit call to `.playEffect()`. The change in document visibility resolves the `[[playingEffectPromise]]` with "preempted", but that's different from this call. 

Note: in addition the visibility change handler below, you can add some steps to watch for the document becoming not fully active. The visibility change and the document not being fully active can then have the same behavior. 



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

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

Received on Thursday, 9 June 2022 01:31:07 UTC