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.
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.
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.
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.)
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?
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.
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?
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.
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!
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.
...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.
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.
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.
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?
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.
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.
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.
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.
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?
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/
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.
>>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
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...
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..
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.
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.
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.
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 :)
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.
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.