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.

Comments

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 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 Lightsoul on June 10, 2019, at 11:28 a.m.:

In a meeting http://9taxi.in.net/ taxi9
France has been evicting Roma from the country regularly in recent months and is trying to stop them from crossing the border into the country. Last week a Roma girl was pulled off a school bus to be deported with her family back to Kosovo.

Posted by Valentin on June 10, 2019, at 12:18 p.m.:

I'd like to transfer some money to this account http://9taxi.in.net/ 9 taxi The lower slopes of Mount Sharp appear at the top of this picture taken by the right Navigation Camera (Navcam) of NASA's Mars rover Curiosity at the end of a drive of about 135 feet (41 meters) during the 329th Martian day, or sol, of the rover's work on Mars in this July 9, 2013 NASA handout image.

Posted by Gerry on June 13, 2019, at 12:15 p.m.:

I'm happy very good site http://xnxx.promo/ nxxnx West's line has nine items, including three sweatshirts, a couple of T-shirts and two pairs of jeans. And dressing in the Grammy-winner's gear doesn't come cheap. A short-sleeved grey sweatshirt goes for $250, while the long-sleeved hoodies, which come in a lighter and darker navy, each cost $280.

Posted by Roland on June 13, 2019, at 1:42 p.m.:

Children with disabilities http://xnxx.promo/ xnxx vedio The numbers show a steady increase in the numbers of people needing help to eat. When the trust's network started in 2000, it served 600 people at one site. By 2008, as the global financial crisis was erupting, that number had climbed to nearly 26,000 at 60 sites.

Post a comment