Back to Wails

Vibration API Demo

v3/examples/web-apis/vibration/frontend/index.html

2.13.0863 B
Original Source

Vibration API Demo

The Vibration API provides access to the device's vibration hardware. It allows triggering single vibrations or complex patterns of vibrations and pauses.

Vibration API: checking...

Quick Vibrations

Short (50ms)Medium (200ms)Long (500ms)Very Long (1s)Stop

Vibration Presets

*

Notification

[100, 50, 100]

Success

[50, 50, 50, 50, 200]

!

Error

[200, 100, 200, 100, 200]

?

Warning

[100, 100, 100]

<3

Heartbeat

[100, 100, 100, 400]

SOS

SOS

[100,50,100,50,100,200,...]

~

Ringtone

[300, 200, 300, 200, ...]

3-2-1

Countdown

[100, 900, 100, 900, ...]

Pattern Builder

Click buttons below to build a pattern...

Duration:ms

  • Vibrate+ PauseClear

Play PatternLoop PatternCopy to Clipboard

Haptic Pad

Tap the buttons for different haptic feedback

123456789

Event Log

Waiting for vibration events...