Skip to main content

GamepadHapticActuator

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.

MDN Reference

Methods

playEffect()

playEffect(type, params?): Promise<GamepadHapticsResult>;

The playEffect() method of the GamepadHapticActuator interface causes the hardware to play a specific vibration effect.

MDN Reference

Parameters

ParameterType
typeGamepadHapticEffectType
params?GamepadEffectParameters

Returns

Promise<GamepadHapticsResult>


reset()

reset(): Promise<GamepadHapticsResult>;

The reset() method of the GamepadHapticActuator interface stops the hardware from playing an active vibration effect.

MDN Reference

Returns

Promise<GamepadHapticsResult>