Hacker News new | past | comments | ask | show | jobs | submit login
Google Chrome may soon get audio indicators to show you noisy tabs (thenextweb.com)
437 points by Lightning on Feb 26, 2013 | hide | past | favorite | 105 comments



I wrote the MuteTab Chrome extension (http://www.mutetab.com/) and have been following the development of this feature in Chrome's bug tracker.

The reason this feature hasn't existed is that Chrome (like all browsers other than IE) would use just a single instance of Flash for all tabs so the browser could not control the volumes independently nor tell which Flash instances were playing sound or might ever play sound. You can read this explanation from Chrome devs here: http://www.reddit.com/r/IAmA/comments/gdyun/iama_we_are_thre...

My understanding (just from reading comments in the bug tracker) is that Google was able to get Adobe to cooperate with them and add some hooks so they could keep track of the sounds for each Flash plug-in separately.

I was able to try this feature out in today's Canary build and it worked for me on the two sites I tried it on: youtubedoubler.com and homestarrunner.com.

The URL chrome://media-internals is also interesting in that it will show an entry for each plug-in instance browser-wide. Hopefully they will have a UI element similar to this or like MuteTab so that a person can find the tab making sound when they have a huge number of tabs open in multiple windows and cannot see all of the audio indicators.


This is one of the benefits of our work to sandbox Flash. In order to support the sandbox we had to broker out all IO and system access by porting to PPAPI. So, this means that everything goes through Chrome's stack and we can control it much like web content content. Unfortunately, this doesn't work for NPAPI plugins since they don't go through Chrome's stack.


This is more exciting than half of the features in HTML5.


Only if it works reliably though. I wonder whether they can make it work with plugins.

Maybe you'd have to get a hook with some platform specific OS API that tells you when sound is playing (does this even exist though)? You could then match this to user interactions within the browser - did the user click inside my browser window when the event started? Then it's probably happening within that tab and I'm gonna show him that animation. False positives wouldn't be very harmful here, so you could let that slip.


That's basically what the MuteTab Chrome extension does (although since extensions don't have access to OS functions, it doesn't tell you if anything is playing a sound or not.)

But with the new code they at the very least have it working with Flash. You can try it out right now by downloading a canary build and going to a Flash site (such as homestarrunner.com.)

The reason it works now while it didn't before is that they are passing extra information between Chrome and Flash so that Chrome can keep track of which Flash instances are making sound.

Edit: Thanks justinschuh for being more specific as to how this communication happens.


I mentioned in reply to you below, but it works for PPAPI plugins because they use Chrome's IO/system stack (since the sandbox prevents direct system access). Examples of PPAPI plugins include Flash, NaCl, Netflix on Chrome OS, etc.


> although since extensions don't have access to OS functions, it doesn't tell you if anything is playing a sound or not

and that's why this should be a browser feature and not an extension.


Agreed. MuteTab development was started back in Fall 2010 when it wasn't clear to me if Adobe would ever work toward making the changes required to enable such a feature.

The extension may live on if there are features that people want but that Google decides do not need to be a part of the browser.


Yes, on Windows you can intercept/hook the Audio API and know where the calls came from.

My company has done that for multiple applications: http://www.nektra.com/products/audio-recorder-api/

Remember that on Google Chrome there is a separation of processes so you can differentiate what tab iis related to the sound.


>Remember that on Google Chrome there is a separation of processes so you can differentiate what tab iis related to the sound.

Unfortunately, it doesn't work that way. While Chrome can run each tab in its own process, all Flash gets run through a single Flash process.


It seems like it would be a nice feature on multiple monitors to use stereo/3D sound to locate an alert sound coming out of a window.

For instance, if it's on the extreme side of the right monitor, play a sound in the right speaker.


Latest AMD video cards have independent audio device for every connected via DisplayPort display (up to 6) and support switching sound output between them depending on positions of windows in Windows drivers. So if sound comes from application with window on the right monitor it would be played in speakers connected to the right monitor.


Interestingly enough, the Rollercoaster Tycoon games (1 and 2 at least) did this for UI sounds. (I also recall reading this had been a feature of some OS of yonder.)


Safari won't run any flash animation until you actually have the tab active and is pretty reliable. I'll be happy if they do that.


I've never run Safari and I find this interesting. So if the tab is say, torn apart and put on a second monitor (which is visible), but you're working on another tab, does it literally pause the animation halfway?


I'm pretty sure it's just starting the animation.


Can confirm this. It was a good feature when using youtube. I usually search for something then shift+click about 4-5 links and watch them one by one. In chrome you have to go into each on of those tabs and pause the video to avoid a clusterf*ck of different sounds. With safari it seems to do it automatically.


The "Stop Autoplay for Youtube" Extension helps with that: https://chrome.google.com/webstore/detail/stop-autoplay-for-...


Why shift+click? Don't you like tabs (ctrl+click)?


I'd not want this for audio, what about pandora in a tab, I don't want it active to listen to the music.


It won't start the animation until you view the tab, but it will continue to play it when you move away.


isn't that flash plugin features ? It's a big problem with flash game on Kongregate for a long time now.


There's only one plugin that people actually use, Flash, and that runs in a NaCl sandbox anyway. So there is no need for any hacks to get this to work.


Flash runs in the Pepper/PPAPI sandbox, not NaCl. Your confusion is understandable, however, since the first version of Pepper was the browser API layer for NaCl. The difference is that NaCl applies an inner sandbox layer that's much stricter than the sandbox used for Pepper Flash (or normal Chrome web content for that matter).


Ah, interesting. At least reading the public Pepper docs, it seems like there is a hook where the browser requests audio from the plugin/NaCl app/whatever. Is that how Flash gets its audio data into the host's audio subsystem?


No kidding! This is like the incognito tab. No idea how web browsers went so long without it.


Read the other comments. This requires the Pepper plugin API. This is not backward compatible with NPAPI where system calls are made by the plugin itself.


On a somewhat related note, while an audio indicator is a nice addition, autoplay itself should really be a user controllable browser setting.


Chrome has a click to play feature under plugins.


I turned this on a few days ago after all the high profile drive-by hackings. I couldn't be more happy with the results. I've added exceptions for youtube, reddit and a few other sites but I feel a lot safer browsing the web now!


But it only works on plugins, not <video>



I would also love a simple indicator of which tabs are 'busy' consuming cycles or generating garbage, so I know which tabs to kill first to get back to acceptable performance. (Perhaps even just a rough indicator of how many setTimeout()s are originating from a page would be enough.)


I wish there was a simple way to suspend all open tabs. I really have no need to refreshing disquis-comments or some crazy scripts that track my mouse pointer to generate heat maps.

I even tried to write a little chrome extension which injects a content script into every open tab, which calls settimer to get the highest timer-id and kills all timers with ids from 1 to this id. But for some reason it didn't work.


Use the Chrome Task Manager. You can get to it via the Tools menu, or a keyboard shortcut (shift+esc on Windows).


s/love/love in Firefox/

...as I meant to imply by replying under an FF issue.

But speaking of Chrome, I'd prefer the activity indicator in the tabs themselves... mapping the Task Manager names to my many tabs distinguishable only by not-necessarily-unique favicons is a pain.


I'm curious if it will be possible to get this feature working in Firefox. Since other posts here indicate that this was possible for Flash because it is using the Pepper stack and since Firefox has said they do not plan to adopt Pepper (https://bugzilla.mozilla.org/show_bug.cgi?id=729481), I wonder how possible this will be.

This feature could significantly negatively affect Firefox's market share.


Shumway is a more direct route to solving this problem than reverse engineering the Pepper API. The Shumway approach has several other advantages too, such as portability and unifying the graphics/audio/JIT stacks of the browser and Flash. Assuming Shumway works out (that's a big assumption, but so is assuming that Pepper could be reverse engineered and shipped), I don't see any technical obstacles to Firefox doing this as well.


The bug indeed seems to conclude it's impossible until Flash is eradicated, though disabling Flash in anything but the foreground tab + click to play will probably make it moot. (Apparently Safari does exactly this)

There's alternatives such as Shumway.

Also, in my experience lack of Flash or it crashing is seen as a way bigger problem than nasty tabs, as of now.


If you are excited with this feature, you should probably try "click to play" for plugins.


The main use I have for the new Chrome feature wouldn't be to find out where audio was playing that I hadn't started, it would be to find out which tab was playing audio if I had lots of YouTube tabs open and I couldn't remember which one I had played.


That's the first thing that came to my mind too. I can't remember the last time I had this problem. Click to play + AdBlock = no unknown sounds.


This. Click to play solved this problem since a long time. For me the noise of a website isn't the music, it's the advertising.


Finally, a way to know what stupid portfolios have automatic music so I can close them without even looking and thus jot being tempted to hire people that do that.


that's why you need to hire me ! i dont.


I hear a lot of people complaining about that very often. I can't remember the last time I had sound in my browser without my knowledge. Maybe it's because most people don't use adblocker?

I have no clue.


Isn't the fact that we're all so excited by this hampered by the fact that it sucks that Chrome automatically starts youtube videos when you open the tab and that's the only reason we need this.


Use Chrome's "click to play" feature or extensions such as Flashblock or "Stop Autoplay" if this is your problem. This feature is more useful generally.


Links to extensions that stop autoplay:

for Chrome – extension “Stop Autoplay for YouTube” https://chrome.google.com/webstore/detail/stop-autoplay-for-...

for Firefox – user script “YouTube Auto Buffer & Auto HD & Remove Ads” http://userscripts.org/scripts/show/49366


Youtube Center is probably miles ahead of both of those.


So I wanted to put together some rudimentary search abilities to our application and I installed solr and all that. I wanted to use dynamic queries and found a way to get dynamic queries working. All thanks to Google. This perhaps took less than a day.

However, the search results were not what I was expecting. Searching 'fname + lname' would return all records with the lname field. No amount of Googling helped and I'm still stuck. I started googling by using phrases such as 'dynamic query not returning results in solr'. When the results didn't solve my problem I got more specific. 'Dynamic query solr with relative boosts not returning results'. No luck. I am learning all about Solr, the schema, eDisMax query processor and all the other good stuff but am not finding any resolutions. Also this process is very exhausting.

I have found this kind of learning to be not stick in memory. Meaning - nothing sits in memory. So tomorrow if an interviewer asks anything about Solr setup - I'll have no answers, or if I have to setup Solr again - I'll have to follow the Google route or follow a manual. Not sure if this is effective but I'd be comfortable having stuff in my memory rather than depend on Google for a majority of my tasks.


BBC Programme pages with embedded iPlayer change the title of the page to contain a ▶ (play symbol) when the content is playing.

E.g. http://www.bbc.co.uk/programmes/b01qrn4y

Perhaps this is common but I hadn't seen it until recently.

EDIT: wanted to add that this means you can see that the page is 'playing', but it doesn't work if you pin the tab in Chrome.


Great news. An indicator for CPU usage would be great too.


I would love that too. Blows my mind sometimes how much CPU some pages or sites use. One of my kids plays Moshi Monsters, and that seems to challenge the CPU more than even Far cry 3. Which to me is absurd. I suppose that would be something to do with MM not using the GPU?

So yeah, a CPU indicator in the tab could be handy.


Moshi Monsters must use some very realistic monster fur rendering if it's heavier than Far cry 3 ;)


Dunno mate. But I do wish I could hunt and skin the little buggers, like in FC3!!!


You can already do that. Use the Chrome Task Manager. http://googlechrometutorial.com/google-chrome-other-settings...


I use that but it'd be great to see at a glance which tab is misbehaving


That would actually be a very good thing to have.


I am excited about this feature. Its really useful when you have tabs that autoplay some sound and you are hunting around to close that tab. Also, if you use grooveshark or some other music service and its in the browser.



Thank you google! I was just thinking about this problem the other day and was even contemplating trying to build something myself but then realized I probably just shouldn't have so many tabs open.


Good idea but:

How about visual indicators of CPU-burning tabs, especially when in the background?

How about a ctrl-C that kills all JavaScript executing in the foreground page (or something)? In my experience Chrome is good for three infinite loops or similar bugs before it needs to be restarted (manually process killed in Windows) while Firefox is pretty much dead after one. Isn't Chrome the "one thread per tab" browser? Why is it so hard to kill JavaScript when debugging?


The CPU feature already exists. Check out the Chrome Task Manager: http://googlechrometutorial.com/google-chrome-other-settings...


I found a chrome extension a few months ago that does a lot of this. It's called MuteTab and bills itself as 'browser-wide granular sound management for chrome'. It's not perfect with flash, but makes a huge difference. http://www.mutetab.com/

EDIT: here's the github - https://github.com/PhilGrayson/MuteTabs


That is not the github. That project is "MuteTabs" which is different than MuteTab.


If you're curious about the HTML5 version of YouTube, you can opt-in at https://youtube.com/html5


Definitely worth checking out. Unfortunately, HTML5 YouTube players seem to start playing automatically, so I can’t just open links to YouTube videos in background tabs.

I look forward to a setting (or simply changing the default for non-active windows) to disable autoplay.


The Flash version of YouTube auto-plays for me, so it's about the same.


>>This change would presumably also be very useful for instantly recognizing which tab is annoyingly blaring sound when you have countless tabs open.

Fantastic, I've wanted this feature for years; and counting browser tabs is easy. FYI, This isn't my feed, just some public one I found. https://cosm.com/feeds/63631


I like the idea but hope that they do not use the current implementation. A moving "favicon" will add visual clutter.


Another example of this can be seen in the Web Speech API (http://www.google.com/intl/en/chrome/demos/speech.html). You will need Chrome Canary in order to test.

I'm currently building a voice-to-text transcriber using the Web Speech API.


Sounds can be annoying, but the top problem for me in Chrome are still accidental clicks on close button when there's lot of tabs open. A simple option to hide the close buttons on all inactive tabs would save a day, but I guess it's not "challenging" enough feature for Google engineers...


This isn't what you asked for, but you can unclose a tab by pressing Ctrl-Shift-T


Or in the new tab window in the bottom right there is "Recently Closed" where you can unclose tabs and groups of tabs.


Multiple people have pointed out that Chrome has click-to-play for plugins. Great! But now that new HTML5 features (<video>/<audio>/Web Audio API) are widely available and ripe for abuse, will we have any options for disabling autoplay for those?


Happy to see this. I frequently keep a ton of tabs open and hate being startled by a random one making noise through an ad. In Fact, about a year ago I wrote a sticky note to myself to make this as an extension for a side project. Never did get around to it...


It's working in Canary for me, even in NaCL Flash (I wonder how many layers of abstraction implementing that had to break through) - it can tell you when music's playing and stopped. I'm not sure how far of a leap an EQ display is, though.


Great, yet another feature that should be being implemented by the OS VENDOR, intead being implemented in a non-standardized manner by an APP DEVELOPER.

See kids, this is what happens when your OS vendors decide that its more important to add shiny to their products than it is to fix deep architectural problems. In this case, that problem is that the AUDIO API's do not already have a native way to add this indicator, anywhere in the OS ..

IF there were a real Digital Audio Mixer implemented in your average Consumer OS, then we'd have per-app audio controls natively being included in such a Mixer interface .. however, the OS vendors have decided its more fun to make shiny things than actually .. you know .. provide valuable OS services.

Color me grumpy. It sucks that the Google Chrome team are having to implement this..


Actually, Windows 7 audio DOES do this - I see separate volume controls for applications if I click on the volume control tray icon. Likely requires driver support for the feature.


Yeah so this is what I mean exactly: use the OS features instead of hacking the App up to do what, should be in my opinion, something just provided to the App by the OS..


What do you mean? A browser knows which of its tabs are doing what, the OS has no idea of the concept of tabs in one browser.


Every audio stream in the OS should be backed up with an OS-based Mixer control, is my point. We had it in BeOS and now it seems .. its finally possible in Win7 .. but yeah .. these aren't the only OS's around to run Chrome on ..


So if you have 50 tabs open, the OS should expose 50 audio sliders somewhere??? How will you know which one is for which tab? Also, isn't it better to be able to CLOSE that tab rather than letting it continue play audio and just mute it?


If you have one channel in the system audio mixer for every channel that the system is playing then yes: you can just see what channel is active and mute it. Like on any old mixing desk.


I wonder if this has anything to do with the Google version of Flash (called "Pepper") that Chrome now includes -- if that will be used as a special hook or something. Or if there's another way to do it.


For Flash it does. Since Pepper plugins use our system/IO stack we can handle them much the same way we do normal web content.


While I'll be glad for the audio indicators why not just mute every tab by default? Any user interaction on a page would unmute that tab.

Can I also get a bandwidth/data transfer rate indicator per tab too?


I often listen to Grooveshark or Youtube on an invisible tab.


Sweet. It would be better if we can mute it by a single click.


If this works reliably, what a feature! I've been wondering for years why browsers didn't show you what tabs were making noise, I'm glad it's a reality now.


http://www.mutetab.com/ is a chrome extension that solves this problem but in a different manner.


Firefox lazy-load is still better. Also, Ubuntu's future integration with audio-menu also (why wasn't it done on browser-level?).


I always wondered why they don't integrate Play/pause in tab if you are on YouTube page - since Google is owner of both.


Even better would be a play/pause button... or is that not feasible? I'm not so familiar with browser development.


It's probably not feasible, because you'd have to pause the entire document, including all scripts. And since there are ways for scripts to communicate synchronously across documents, you could end up with seemingly unrelated tabs paused.


Perhaps a mute/unmute would be more feasible.


Or a per-tab volume control. Volume control for HTML5 videos, games, etc. has always seemed to me like something that belongs in the browser chrome, not inside the tab itself.

(Really, this is another way to say, "I'm a lazy HTML5 developer and I think having to create a 'sound-effects preferences' view on every project I do is a bit silly, if the browser could just be handling it for me." ;)


PulseAudio, I already get that for free :) The default KMix app in KDE presents app volume sliders as well as the Master audio slider in the tasktray icon. One of my absolute favorite linux features, especially since I pass through my Xbox and I can control it too.


Oh, Windows does it too--but that's per app, not per tab. Apparently quite a few people like to listen to music on youtube while playing my game with the volume off :)


Fantastic news.

Trying to figure out which page is making noise, was most of the reason for installing an ad blocker.


This is pretty great, but I'm dismayed that it's even needed because someone somewhere started the trend of triggering audio without the user's interaction.

"CONGRATULATIONS, YOU'RE A WINNER!"

Congratulations, you're a jackass. You do NOT interrupt Black Sabbath.


Bell in window 0


wonder how it is implemented. How can chrome possibly know if a flash or silver-light is playing a sound ?


That is an incredibly useful feature.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: