Gamepad: hapticActuators property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("Gamepad")}}{{SeeCompatTable}}

The **hapticActuators** read-only property of the {{domxref("Gamepad")}} interface returns an array containing {{domxref("GamepadHapticActuator")}} objects, each of which represents haptic feedback hardware available on the controller.

Value

An array containing {{domxref("GamepadHapticActuator")}} objects.

Examples

js
const gamepad = navigator.getGamepads()[0];

gamepad.hapticActuators[0].pulse(1.0, 200);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also