Why is the metronome in JS "stumbles" when used on a mobile device?

Good afternoon.
Actually there is a simple metronome https://Angel_Cassin.github.io/metronome/
On the PC knocks smoothly, and on your mobile device and emulator "stumbles" ...
Is it related to downloading the audio file or that audio api and buffering ? or something else ?
The files themselves https://github.com/Angel_Cassin/Angel_Cassin.github.io/tree/...
March 12th 20 at 08:43
1 answer
March 12th 20 at 08:45
Solution
Metronome on setInterval? Yes you are a mega optimist.
I understand you, thank you - Angel_Cassin commented on March 12th 20 at 08:48
@Macy.Web, but audio is its atmosphere, thank you - Angel_Cassin commented on March 12th 20 at 08:54
@Macy.Web, but I don't understand, please explain, if not difficult, why setInterval is not suitable for the metronome? - Tia_Dool commented on March 12th 20 at 08:57
@Tia_Dool, Because no one can guarantee the accuracy of its repetition (the tick of the metronome) with setInterval. And this metronome is the most important thing. Read about how JS works and about its async. - valentin.Kautzer commented on March 12th 20 at 09:00

Find more questions by tags AudioHTMLJavaScript