Chrome’s web audio change is bad news

Written by Adrian Holovaty on May 9, 2018

Google Chrome has changed the way audio playback works, such that no audio will be played unless a user interacts with the web page first. Read more in their overly cutesey announcement. (Note to Google: using meme images in announcements like this is not a good look.)

This change broke Soundslice audio playback for a short while, until one of our customers notified us. Since then, I’ve been following the web-developer response with great interest. This bug report in the Chromium bug tracker has materialized as a place for developers to argue against the change.

I’ve just posted a comment there, and I feel strongly enough about this that I wanted to post it here to my blog as well:

Adding to the many excellent sites mentioned here — my company Soundslice makes a web-based sheet-music viewer that syncs audio/video with music notation (example). We’ve also been affected by this poorly thought-out Chrome change.

We’ve fixed it by adding hacky workarounds for Chrome, but this is a big step backward for web audio.

To anticipate an argument from the Chrome team that “only fun hacks, games and art projects are affected” — that is NOT the case. Soundslice is a real business with paying customers.

We knew it was risky to build a business on top of the Web Audio API when we first launched support for it in 2014, but we expected browser support and user experience would improve over time. Unfortunately it’s been a consistently rocky road since then. The draconian web audio limitations on iOS — basically the same as this new Chrome behavior — have been a disaster, and Chrome never should have followed in Apple’s footsteps.

The good news is that nothing is set in stone, and the Chrome team can undo this change to show competence and goodwill.

Finally, an existential question for the Chrome team: do you want the web to continue ceding mindshare to native apps? If so, please continue neutering what we web developers can do, and please continue encouraging sub-par experiences for end users.


Posted by Šime Vidas on May 9, 2018, at 3:10 p.m.:

Could you explain why the user interaction requirement is a problem for your service? In the example you provided, the playback is controlled via the play/pause button at the bottom, which seems to work fine.

Posted by Developere whos been forced to make autoplay on entering website on May 9, 2018, at 3:36 p.m.:

I love the change. Its a blessing. What are reasons you really need autoplay? User has first to make an action to actually play and this is great.

Posted by Andrew on May 9, 2018, at 11:15 p.m.:

Perhaps try reading the thread. They enabled the change without getting a large enough sampling of the sites that are effected. And basically threw the baby out with the bathwater.

Posted by Tim on May 10, 2018, at 6:01 a.m.:

So the issue is you weren't given enough notice? Because your post sounds like it's apocalypse. Can you not just add a "play" button?

Posted by Schmoo on May 10, 2018, at 6:09 a.m.:

The bathwater really does need to be thrown out though. Interaction is a very small ask, and it's not the only way to get around this. I'd be sorry to lose any app, but that's not what's happening here and you're acting as if this change is someone trying to kill your business specifically. They are requiring a click FFS, get some perspective.

You need to dial down the outrage, and perhaps move the balance of it a little away from Chrome and little more towards "we knew it was risky".

Posted by Steven Estrella on May 10, 2018, at 6:32 a.m.:

I agree that this change to Chrome is badly done. The problem is that if an AudioContext is created when the page loads (from a direct URL request), then the AudioContext is automatically paused even if that AudioContext is not currently playing audio. That breaks a lot of code even in games where the user is required to click something before audio playback begins. So the fix Chrome implemented goes beyond stopping autoplay. Now I have to add context.resume() to the play button code in every page. ugh!

Posted by SoundSlice customer on May 10, 2018, at 7:08 a.m.:

As a SoundSlice customer, I see so many obnoxious autoplaying muted video ads that I’d gladly accept the tradeoff of disabling all autoplaying videos. That’s not currently possible in Chrome - the autoplay config flag actually still allows muted videos. I agree that the Chrome team shouldn’t make sudden unannounced changes, but disagree that requiring user interaction is a bad thing.

The UX damage from autoplaying video ads is worse than having to spend a bit more effort when I use SoundSlice (especially if Chrome supports whitelisting a domain).

Posted by CL on May 14, 2018, at 4:02 p.m.:

Personally, I applaud the change. No matter if it's an ad, a music site, or even a video site like YouTube, it really annoys me that things start playing the instant you visit them. I'm 100% behind requiring a click to play. If they want to add the ability to give a site blanket permission to play on visit, that's fine, but I'll probably never use it.

Posted by ChatApp on May 23, 2018, at 1:02 a.m.:

I'm all for letting the user block autoplay, I'm just not for Chrome's solution.

Example where the change sucks. Chat apps. Chat apps want to make a "ping" sound when a new message arrives. Can't unless the user interacts. I reboot my machine and or log out. I restart Chrome, it reloads tabs, tabs that have my chat sessions in them. This change basically means I have to go to each tab and click something before I'll start getting notification sounds.

You might say a solution is to use the notification API but the notification API has other issues. One is that without warning message contents gets displayed in the notification. That content might not be something I want someone else to see so I have chosen not to opt into the notification API instead preferring just a sound so I can choose if it's safe to view.

A better solution, at least for chat, is to let the user whitelist the page. That's not an option with Chrome's new system.

Posted by Confirm Form Resubmission on October 24, 2018, at 12:58 a.m.:

This is really a bad news that Google Chrome browser has changed the way of audio playback works, firstly user interacts with the web page first then can play audio. Thanks for sharing this.

Posted by Dell Laptop Not Charging on November 22, 2018, at 12:34 a.m.:

Thanks for sharing this post. I have gained knowledge from your post. Please keep it up and thanks again.

Posted by john richard on December 5, 2018, at 2:07 a.m.:

I truly appreciate this post. I ave been looking all over for this! Thank goodness I found it on Google. You ave made my day! Thank you again

Post a comment