IonDen/ion.sound

Google autoplay policy

jstackman opened this issue · 4 comments

It seems that there may be an issue starting in October 2018 with Google Chrome. When running it, I am getting the following warning in Google Chrome:

The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu

I guess you have to do some kind of resume() thing, but I am not familiar with AudioContext().

I see, i will investigate the issue.

But it should not affect sounds that are played by clicking buttons.

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

@akaDJon, this can not be solved by JavaScript. This is new browser policy.
To solve this you should do:

  1. Add button, call it "allow sounds"
  2. After user clicked it - play any sound
  3. Now all sounds are allowed on the page.

@IonDen can you add example to docs like this add with true-way? Thanks