Having
var audio = new Audio("click.ogg")
I play a click sound if necessary
audio.play()
However, sometimes the user works so fast that the browser does not play sound at all (possibly when playing the previous play request). Is this problem related to preload ?
How to make the browser stop playing and start? No stop , only pause in the HTML5 audio component, right? What workaround can I use here?
Update - additional note:
I have several elements marked with a div flag with a touchend event. When such an event is triggered, the elements visually change, the sound is played, and the internal variable is set accordingly. If the user clicks on these items slowly, everything works well. When pressed quickly, the sound is often completely skipped ...
source share