Closed madc0w closed 2 years ago
That's probably because you're opening index.html
directly from the filesystem.
If you access it through a web server (e.g. Apache), it works.
I couldn't figure out how to make it work without a web server.
I couldn't figure out how to make it work without a web server.
You can't, due to browser security policies.
Closing. These demos don't work from a file:
filesystem (security policies). To test locally, there are extensions to common code editors, like VSCode, that allow opening a page in a local web server. (I use this to test these pages when I adapted them to modern JS)
pushing the play button results in:
index.html:81 Uncaught (in promise) DOMException: The element has no supported sources.
here:
audioElement.play();