In other words I would like to go around the Chrome settings that prevents sounds from playing on page load (not just on my computer but for every future user).
Here is the interesting part of my index:
<body onload="playCreditMusic()">
And the javascript function:
const playCreditMusic = () => {
const audio = new Audio('../sound/sound.mp3');
audio.play();
};
Here is the error message:
DOMException: play() failed because the user didn't interact with the document first.
Does anyone have an idea?