4 ms·
I believe that this restriction has been in effect on mobile for quite some time (in fact, I don't think mobile Safari ever had WebAudio without this limitation
by nfriedly 8y ago
I believe that this restriction has been in effect on mobile for quite some time (in fact, I don't think mobile Safari ever had WebAudio without this limitation.)
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.
- fenomas 8y ago> 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.
- asplake 8y agoI 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.
- favorited 8y agoThe 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.
- jernoble 8y agoThat 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.
- asplake 8y agoNoticed it only a week ago, but since upgrading to 12.0 I can no longer reproduce. Awesome!