Unable to make audio autoplay in my code | Sololearn: Learn to code for FREE!


Unable to make audio autoplay in my code

I have created a code in which I wanted to add autoplay audio feature but that's not working then i added click function on body to start but I wanted to autoplay the audio..... This is my code.... https://code.sololearn.com/W6Nz79tL9FUo/?ref=app

3 Answers

New Answer


You could autoplay using AudioContext API or JS libraries such as Howler.js


https://developers.google.com/web/updates/2017/09/autoplay-policy-changes May not work in all browsers due to security.. Hope it helps... https://www.sololearn.com/discuss/2610028/?ref=app