I want to play music when entering my web. I set the autoplay function of SM2 but I'm getting this error:
soundmanager2-nodebug-jsmin.js:38 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.
So I have to mute and unmute the sound to start hearing the music. How can I fix it?
You should only get this error on Google Chrome.
With the latest update, Google Chrome has stopped allowing the autoplay feature. You can try to use any other browser like Mozila to see if it works there. Up until now there is no solution to this problem, a user has to click something for the video or audio to start.