nasso / urmusic

An application to make your own music visualizer, easily and for free!
https://nasso.github.io/urmusic
Apache License 2.0
59 stars 30 forks source link

Audio doesn't play on Chromium browsers before user interaction #19

Open Taureon opened 2 years ago

Taureon commented 2 years ago

I selected a visualizer, dropped a music file in, and it just doesn't work at all. The only thing I can say is that in the console it says something about requiring an user gesture on the page and then the audio to be resumed.

Taureon commented 2 years ago

if it works for anyone else, please tell me the exact browser that you are using just in case it is just a me problem

nasso commented 2 years ago

I think this is a limitation some browsers have to prevent websites from playing audio automatically in the background without any user notice. I don't know if Firefox has this though, have you tried?

Taureon commented 2 years ago

after i turn the setting on to allow audio on the page, yea it works. i still think you should load the audio stuff after the user interacts with the page so maybe it works on chrome again, because almost everyone i ever talked to uses chrome for everything and i happen to have firefox installed

Taureon commented 2 years ago

BIG CORRECTION chrome has the "enable audio" setting too, but you need to go to chrome://settings/content/siteDetails?site=https%3A%2F%2Fnasso.dev after that you can reload the site and everything should work

nasso commented 2 years ago

i still think you should load the audio stuff after the user interacts with the page so maybe it works on chrome again

Yeah exactly, this would solve the problem!