Anvil.js Audio error

@stucork I’m hoping you could help me with the following. I have my audio object instantiated via self.audio = Audio(filename)

Then with a button click it plays the audio as follows:
self.audio.play()

It works fine for a few click then it gives the following error:
ExternalError: NotSupportedError: The element has no supported sources.

Have you ever come across this before? I’ve looked through a lot of documentation, but I can’t figure it out.

Hi @smuts1989 - i’ve moved this question to a separate topic.
A minimum example that demonstrates the problem and steps to reproduce will help others to answer your question.
You’ll also find that error if you search for it in google, which might give you more insight into what’s happening.

@stucork Thank you for the suggestion, I have looked into a lot of documentation on Google. The main problem with searching for javascript code is that it’s nearly impossible to find “javascript run from Python” which is essentially what we are doing with Anvil. It’s more the smaller aspects of the javascript integrated into Python which is more or less an Anvil-specific area. I have some ideas from another thread, but if the problem persists, I will create an MVP app and post it here for help :slight_smile: