staskobzar / vue-audio-visual

VueJS audio visualization components
MIT License
693 stars 111 forks source link

The AudioContext was not allowed to start #22

Closed lukas-pierce closed 4 years ago

lukas-pierce commented 4 years ago

On page loading console warn:

The AudioContext was not allowed to start. 
It must be resumed (or created) after a user gesture on the page. 
https://goo.gl/7K7WLu

is it possible to do delayed initialization?

qbunt commented 4 years ago

I am also experiencing this, the above link points to a changed policy in audio auto-start rules, and would directly impact this plugin without some sort of delayed execution in the manner of a click or similar.

staskobzar commented 4 years ago

Hello, I will try to fix it this weekends. If you have a patch, please, feel free to provide pull request.

qbunt commented 4 years ago

Unfortunately, not sure there is an easy fix here, you'd have to wait for some kind of user interaction first and then create an audio context and/or resume it, it's definitely not conducive to using inside a component like this without attaching some click event first.