Vibration
This feature is not (yet) supported on your device
The Vibration API enables web apps to make a mobile device vibrate.
Demo
Tap, hold and lift your finger on the surface below to create a vibration pattern. Use the Play button to play the
vibration pattern on your device.
fiber_manual_record
play_arrow
stop
const maker = document.querySelector('#pattern-maker');
const visualizer = document.querySelector('#pattern-visualizer');
const recordButton = document.querySelector('#record');
const playButton = document.querySelector('#play');
const stopButton = document.querySelector('#stop');
const ripple = document.querySelector('#ripple');
visualizer.innerHTML = '';
let pattern = [];
const patternLength = 3000;
let startTime = 0;
let currentTime = 0;
let patternTime = 0;
const frames = [];
const visualizerWidth = visualizer.offsetWidth;
const moveRipple = (e) => {
const touches = [...e.changedTouches];
if(touches.length) {
const {pageX, pageY} = touches[0];
ripple.style.top = \`$\{pageY\}px\