ws-audio-api icon indicating copy to clipboard operation
ws-audio-api copied to clipboard

the audio context was not allowed to start

Open yannik131 opened this issue 4 years ago • 0 comments

On several browsers I received the above error because the anonymous function in xaudio.js at line 598 which is called after its definition creates an audio handle. This is not allowed unless the user has previously interacted with the browser in some instances (occurred only on my mac). I put the function and the anonymous function in ws-audio-api.js in named functions initStuff or something and called them just before initializing the streamer and player variables (which is triggered by the user clicking on a button, thereby interacting with the site). This solved the issue. I suppose putting those functions in something you can call would be sensible. Or if you know of any loopholes to avoid this problem, I'd be glad to hear them.

yannik131 avatar Jan 21 '21 21:01 yannik131