-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vibration/Taptic/Haptic motor provider #47
Comments
Furthermore the API could look like this: api.vibrate({
type: "medium", // or heavy, light etc, this'd only be available for taptic engine devices
duration: 300, // self explanatory, how long the vibration will last (in ms) not sure what iOS uses by default but properly some very low number
})
// in simpler form
api.vibrate({type "medium", duration: 300})
// or perhaps just normal arguments
// however in my opinion this is a bad idea.
api.vibrate("medium", 300) |
I’m fairly sure the JS specification already supports this. See: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
… On 19 Feb 2021, at 18:51, 0neGal ***@***.***> wrote:
Furthermore the API could look like this:
api.vibrate({
type: "medium", // or heavy, light etc, this'd only be available for taptic engine devices
duration: 300, // self explanatory, how long the vibration will last (in ms) not sure what iOS uses by default but properly some very low number
})
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Didn't even know this existed! Quickly testing it, it doesn't seem to work? window.navigator.vibrate(200) At least it does nothing for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This'd allow widgets to give the user feedback when clicking things, which could be very useful to give the widgets a more native feel.
The text was updated successfully, but these errors were encountered: