vibration

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetProvider

func SetProvider(p Provider)

func Vibrate

func Vibrate(pattern []int64) error

Types

type Provider

type Provider interface {
	// Vibrate runs a web-Vibration-API pattern: alternating vibrate/pause
	// durations in milliseconds.
	Vibrate(pattern []int64) error
}

Provider is a native vibration backend. On mobile the shell registers one via SetProvider (Vibrator/VibratorManager on Android, UIFeedbackGenerator on iOS). Desktop hardware has no vibrator; the JS bridge falls back to navigator.vibrate() where the WebView supports it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL