Last post May 06, 2019 12:47 PM by Brando ZWZ
May 06, 2019 06:47 AM|ngaisteve1|LINK
I try this example which works only when I click the button. But when I try to call the playAudio method automatically (when the page load), it doesn't work. I have commented out the code.
I don't want it to method to be called inline in body tag though.
My code is at http://js.findingsteve.net/sound.html
May 06, 2019 12:47 PM|Brando ZWZ|LINK
According to your description and codes, I have created a test demo on my side, it works well.
I guess you may use chrome as the browser. As far as I know, the Chrome has the autoplay policy to disable autoplay.
I suggest you could follow below steps to enable the autoplay when page loaded.
First step, enter chrome://flags/#autoplay-policy in Chrome browser.
The second step is to change Default to No user gesture is required in Autoplay policy.
The third step, click on the "RELAUNCH NOW" below, and you're done!