Gamepad: vibrationActuator property
Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The vibrationActuator
read-only property of the Gamepad
interface returns a GamepadHapticActuator
object, which represents haptic feedback hardware available on the controller.
Value
Examples
const gamepad = navigator.getGamepads()[0];
gamepad.vibrationActuator.playEffect("dual-rumble", {
startDelay: 0,
duration: 200,
weakMagnitude: 1.0,
strongMagnitude: 1.0,
});
Specifications
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 |
vibrationActuator |
68 |
79 |
No |
No |
55 |
16.4 |
No |
68 |
No |
48 |
16.4 |
10.0 |
See also