Hacker News new | past | comments | ask | show | jobs | submit login

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?




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

Search: