Chrome updated to temporarily remove the autoplay policy for the Web Audio API
bugs.chromium.org
bugs.chromium.org
The browser trying to figure out if I intended to play audio is way too error prone versus me just asking.
I work on an audiobook player as a developer have been fighting this junk on iOS for years, it’s nothing but trouble. If I could just secure a permission to play audio worry free it’d make my life so much easier. Right now we need to ensure that all our audio is triggered by a click event, and if it gets too many steps away from the click event itself, everything breaks. It’s literally defined and limited how we can abstract our code.
[0]: https://developers.google.com/web/updates/2017/09/autoplay-p...
That would make most good UIs unusable. UI animation and audio aren't remotely the same category of interruption.
I enjoy animation, in art and film. I don't want it in my UIs and always turn it off completely when I have the option. I hated it when Photoshop introduced animated zoom, inertia panning etc, but thankfully could turn those off. It's like a surgeons scalpel with a springy handle, it adds a level of abstraction and indirectness that I don't enjoy. I also prefer to use a Bic Orange razor rather than an over-engineered, sprung, 5-bladed one, because I get direct rather than fuzzy feedback.
The animations in MacOS are honestly a large reason why I don't like it and only use it when I have to. One of the arguments that is often used to justify UI animation is that it helps relate one component to another. Ok so if for some reason I'm unable to work out that the icon I just clicked in the dock caused the application it represents to open, maybe seeing the animation would help. Once. Then I know, so why do I need to see it tens of thousands of times after that, forever re-educating me on this complex relationship of interface components. When I click a button, I just want it to do its job. Not do a little dance for me first. I'm trying to get stuff done.
One of the first things I do with any new Android phone or ROM (after enabling Developer Options) is to turn off all interface animations.
Any of us who have worked with designers or worked as designers ourselves (me, both - and I've made the egotistical mistake I am calling others out for, sure) know that far too often, animations are made because some people think they look 'cool'. Then they come up with back-justifications for them.
I may not be representative of the majority but "That would make most good UIs unusable" couldn't be less true for me.
The bouncing application icon lets you know the know your app’s status as it opens, and it doesn’t delay your access to a program. The window spread shows you exactly where each window will be placed so that you can quickly find the one you want, and so on.
What animations aren’t you a fan of?
I think animations is one of the places where a smart smartphone company could attack Apple on a UI basis...
Apple is wedded to a rich multimedia UI. It’s so tightly connected to their brand they have no voice.
But someone who came in with a low-media, animationless UI could best Apple on speed, General “UI mess”, and energy consumption. An interesting UI brand could be built around that.
If on click it went grey then disappeared it miiight be considered animated.
Finding out whether JS is currently animating an element is about as hard as solving the halting problem.
Video is, oddly enough, not, even though "images" are.
"Any sort of animation" seems kinda tough to implement without completely breaking just about every modern site. Enforcing it would require, at the very least, disabling JavaScript and crippling CSS.
Given the failures of Web based OSes, where even ChromeOS had to reach for Android native apps, it shows we will never get there.
The "open web" was ahead of "native" mobile until the point of apostasy.
Still, Mozilla could have long ago pushed a permissions API that put all web app permissions in a single modal. Instead, of course, Mozilla chased mobile (fail) and an endless sort of silly projects nobody asked for (remember web identity?).
(If 1 billion people spend 10 seconds 100 times over the course of a year or two - a reasonable guess for how many sites they might visit over 2 years which use cookies - this is 277,777,778 hours spent on annoying busy work. We might dollarize this to $2.7 billion in wasted user time / annoyance.)
I guess a Chrome extension listing all implementations for major websites could work though.
[1] http://ec.europa.eu/ipg/basics/legal/cookies/index_en.htm
> The policy will be re-applied to the Web Audio API in Chrome 70 (October). Developers should update their code based on the recommendations at: https://developers.google.com/web/updates/2017/09/autoplay-p...
This is wrong and really needs to be reconsidered. Nearly all of the examples of broken webpages on that thread are write-and-forget games, which will never be updated; this plan would break them permanently, just to save a little engineering effort in Chrome.
The solution is simple: display a permissions request, like there currently is for camera, location and microphone. That's how it should've worked in the first place.
IMO the best solution is to just mute the autoplaying media until the user interacts with the page. Completely transparent to sites, and doesn't burden the user with unnecessary pop-ups.
This seems like a good compromise but doesn't sound like enough on its own. Sometimes I just open pages and look at the resulting video and it would be puzzling for it to be muted. Or does "interacts with" include merely viewing the tab? Even though it's religion for me, lots of people never or rarely ever "open in new tab". So this design change would eliminate the benefit.
Basically the new policy triggered based on how you set up your AudioContext, regardless of whether you played any sounds. Most sites doing anything interesting with WebAudio just set up their context at init time (until now there was no reason not to), so as a result almost every WebAudio demo out there got broken. I was looking through back issues of Web Audio Weekly and in Chrome it was a wasteland - nothing worked, autoplay or not.
I know the Chrome team works hard, but sometimes it's hard to believe that they feel the responsibility of stewardship they have over the web. Breaking existing content with no benefit to user experience should be considered a showstopper bug, not something you just delay until "after developers have time to update their code".
The real problem is the unethical use of APIs to increase advertisement related KPIs.
So, maybe this was a huge win in the future but it was a huge lose now. It affected ~0 advertisers and instead affected 1000s of interesting and experimental sites.
Mobile Safari already has this requirement and it works in a different way.
The problem is that the Chrome team did it in a completely different way that broke everyone's expectations. It also didn't make any sense. Why would you require the dev to unpause the Context themselves? Why not just unpause it automatically once the user has interacted in the right way? And now that Chrome has moved, what if Edge and Firefox create their own 3rd and 4th standards.
I have a library that was broken by this. It was an easy fix, but it was still headscratching that I needed to do anything. Like most libs, I was already complying with the mobile Safari way of doing things.
If it were the case, why wouldn't we have already been down this road with SSL certificates? If I want to open the jrockway CA with a policy of "I will literally sign any CSR with no verification", I can't, because no major browser vendor will add me to their certificate whitelists. That's not an antitrust violation.
The CA situation is a different model. To be honest the whole trustworthy CA thing is a joke as we’ve found out recently. The model is broken. Look at Symantec.
The only reason to ever discriminate between pages is when one has actually committed a crime (e.g. the safe browsing lists)
For anything else my own little blog should be the same as Google’s largest sites.
But it's not enabled on all pages in Chrome unless you install an extension. By default, Chrome enables built-in ad blocking on specific set of sites that they consider intrusive.
> The only reason to ever discriminate between pages is when one has actually committed a crime (e.g. the safe browsing lists)
Careful, I don't think you're gonna get to see the criminal complaint for all on the safe browsing list. Or you you mean committed a crime in Google's eyes?
As many are pointing out in the issue thread, I hope they figure out a solution that doesn't break countless existing sites, apps and experiments (including their own, such as https://musiclab.chromeexperiments.com) using the Web Audio API.
I'm also not happy about the whitelist, and suspicious of the new Media Engagement Index.
https://twitter.com/mcclure111/status/993517176798638080
https://bugs.chromium.org/p/chromium/issues/detail?id=765667
You can also block videos completely with an adblocker.
[0]: https://developers.google.com/web/updates/2017/09/autoplay-p...
They're providing a fast lane for the current popular sites and everyone else gets a slow lane. It's kind of hard to get out of the slow lane when you're forced to go slow.
It'd be nice to have a whitelist/blacklist import/export, so there can be multiple community-sourced efforts to classify sites into reasonable use of autoplay vs. unreasonable. One can dream.
Here's a maybe dumb suggestion. Make make a new API. Sites using the old API will get a blocking dialog. Sites using the new API will get the desired behavior. That way old content is still accessible.
Maybe `new AudioContext2()` or `new AudioContext({version: 2})` or `new AudioContext({optIntoNewBehavior: true})` where old behavior pops up a modal dialog?
Just throwing out ideas.
Listen to users, they need protection from developers.
Users aren't winning if their web audio apps inexplicably stop playing sound in a new version, if Chrome's decision makers decide to muck around with a standard in such a way that devs acting in perfectly good faith find their Web Audio API stuff breaking/working from release to release, and those devs either have to burn time adapting to the hoops du jour particular to each browser or simply give up trying to hit a moving/multiplying target.
As others have pointed out, there are simpler ways to offer users consideration for opt-in audio.
So here's how weird and user-unfriendly this is. If you link straight to a page, it will be muted. [Autoplaying sound - unless you're in Chrome 66] http://dryad.technology/gametitle But! If you go to http://dryad.technology first and then click "Game Title", it plays sound. If you control-click it to open it in a new tab, it also plays sound. But if you drag the link "Game Title" to the tab bar to open a new tab, it doesn't. This honestly doesn't look like a fully-baked feature.
1. "Users want to view my website but Chrome is getting in the way.."
2. "Users don't seem to want to visit my website. Perhaps I'm doing something wrong..."