Skip to content
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

Open
0neGal opened this issue Feb 19, 2021 · 3 comments
Open

Vibration/Taptic/Haptic motor provider #47

0neGal opened this issue Feb 19, 2021 · 3 comments

Comments

@0neGal
Copy link

0neGal commented Feb 19, 2021

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.

@0neGal
Copy link
Author

0neGal commented Feb 19, 2021

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) 

@Matchstic
Copy link
Owner

Matchstic commented Feb 19, 2021 via email

@0neGal
Copy link
Author

0neGal commented Feb 19, 2021

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants