Re:Tell HN: Legacy WebAudio content will break in Chrome 70
by fenomas on Tuesday September 25, 2018 @11:25AM
(#18067102)
> But as a user, I appreciate the fact that websites won't be able to just start playing audio without some interaction from me.
To be clear I agree with the intent of the policy. But Chrome's implementation breaks most/all legacy content even if follows the intent of the policy.
When the policy originally went live in Chrome 66 I went looking through back issues of WebAudio Weekly, and it was a wasteland - everything was broken, including the demos that followed the intent of the policy, with "Play" buttons like you describe.
Re:Tell HN: Legacy WebAudio content will break in Chrome 70
by asplake on Tuesday September 25, 2018 @12:44PM
(#18067971)
I don’t know if this contradicts your belief about mobile Safari, but it continues to bug me that browsing to CNN often (always?) stops whatever audio I already have running. I look forward to the day when all browsers prevent this kind of unwanted behaviour.
Re:Tell HN: Legacy WebAudio content will break in Chrome 70
by jernoble on Tuesday September 25, 2018 @09:08PM
(#18071863)
That should have stopped happening in iOS 11.4. If you’ve upgraded to-or-past that and you’re still seeing that happen, please let me know: email in profile or @jernoble on Twitter.
Re:Tell HN: Legacy WebAudio content will break in Chrome 70
by asplake on Thursday September 27, 2018 @02:50PM
(#18087524)
Noticed it only a week ago, but since upgrading to 12.0 I can no longer reproduce. Awesome!
Re:Tell HN: Legacy WebAudio content will break in Chrome 70
by favorited on Tuesday September 25, 2018 @03:59PM
(#18069954)
The iOS Twitter app does this all the time for me. I'll be listening to an audiobook and scrolling my Twitter feed, and the audiobook will pause as soon as a (muted!) video appears in my timeline. It's infuriating.
So, if your code works on mobile right now, it should also work in Chrome 70.
As a developer, it's kind of a PITA. But as a user, I appreciate the fact that websites won't be able to just start playing audio without some interaction from me.
Also, to clarify the fix, the WebAudio context must be either created or resumed in response to a click/tap/etc. I usually just provide some "Go" button and then create the context in the click handler.