Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to vibrate phone using javascript

// vibrate device for 300 milliseconds
window.navigator.vibrate(300);
// vibrate for 300 milliseconds
// then wait for 100 milliseconds
// vibrate again for 200 milliseconds
window.navigator.vibrate([300, 100, 200]);
// cancel out ongoing vibration
window.navigator.vibrate(0);
//https://usefulangle.com/post/185/javascript-vibrate-device
 
PREVIOUS NEXT
Tagged: #vibrate #phone #javascript
ADD COMMENT
Topic
Name
5+8 =