GamepadHapticActuator
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The GamepadHapticActuator
interface of the Gamepad API represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
This interface is accessible through the Gamepad.hapticActuators
property.
Properties
-
GamepadHapticActuator.type
Read only -
Returns an enum representing the type of the haptic hardware.
Methods
-
GamepadHapticActuator.pulse()
Read only -
Makes the hardware pulse at a certain intensity for a specified duration.
Examples
TBD.
Specifications
Specification |
---|
Gamepad Extensions # gamepadhapticactuator-interface |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
GamepadHapticActuator |
68 |
15 |
55 |
No |
55 |
No |
No |
68 |
55 |
48 |
No |
10.0 |
playEffect |
68 |
15 |
No |
No |
55 |
No |
No |
68 |
No |
48 |
No |
10.0 |
pulse |
No |
15-79 |
55 |
No |
No |
No |
No |
No |
55 |
No |
No |
No |
reset |
68 |
15 |
No |
No |
55 |
No |
No |
68 |
No |
48 |
No |
10.0 |
secure_context_required |
86 |
86 |
91 |
No |
72 |
No |
No |
86 |
91 |
61 |
No |
No |
type |
68 |
15 |
55 |
No |
55 |
No |
No |
68 |
55 |
48 |
No |
10.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator