html.Audio unreliable?

We use html.Audio-Divs throughout our application like this:

html.Audio(
    src="/path/to/audiofile.mp3",
    autoPlay=True,
    loop=True,
    preload="auto"),

unfortunately the autoPlay doesn’t work reliably. The case holds true for Windows and Linux alike as well as for different browsers. I hope, that adding preload="auto" would change something here because i thought it has something to do with the browser not loading the whole sample before trying to play it back, but that didn’t change the behavior of the Div.

Did someone already find a workaround or a solution for this issue? Did anyone experience similar behavior?

Thank you in advance for every answer.

1 Like