0
How can i control phone vibration using javascript !!..
5 odpowiedzi
+ 1
window.navigator.vibrate(200); // vibrate for 200ms
window.navigator.vibrate([100,30,100,30,100,30,200,30,200,30,200,30,100,30,100,30,100]);
You can either set a single value or pass a array.
Note: It will not work on Sololearn due to permissions.
+ 2
Amey Bhavsar thanks for your idea...I've implemented it in my code, check it out:
https://code.sololearn.com/Wh9jFl2q0fzG/?ref=app
+ 1
When we pass a array as the parameter, it creates a pattern of vibration.
0
What happens when we pass array as paramete😐