Live data from Hacker News

Google Chrome may soon get audio indicators to show you noisy tabs

thenextweb.com

21–30 of 111 posts

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#21
post #11
post #7

Earlier quoted context omitted.

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…

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.

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#23
post #7

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…

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.

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#25

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 sou…

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.

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#26
post #16

Earlier quoted context omitted.

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.

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#27
post #17

Firefox bug for this: https://bugzilla.mozilla.org/show_bug.cgi?id=486262

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.)

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

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#28
post #7

Earlier quoted context omitted.

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…

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…

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.

Re: Google Chrome may soon get audio indicators to show you noisy tabs

#30
post #7

Earlier quoted context omitted.

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…

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).
Post reply on HN