Browser Sandboxing: Windows-Based Sonic Shortcomings
I ran into an interesting glitch yesterday that I thought I’d pass along for your perusal, comment and reference. As I inferred two weeks ago, I’ve recently upgraded all of my Firefox installations to v3.6 (which, by the way, didn’t end up solving my MacBook Air return-from-sleep lockup problem; I’m back on Google’s Chrome browser full-time with no subsequent issues uncovered so far). While working late last night on my Apple laptop, I decided to jam out to some sleep-suppressing techno from Pandora, accessed by my Windows Vista-based Dell XPS M1330 laptop and subsequently sent to my Apple TV (which is connected to my A/V receiver).
Normally, I’d only be able to stream music from iTunes, using the proprietary AirTunes lossless compression and encryption protocols. However, as I mentioned a while back, Rogue Amoeba reverse-engineered AirTunes (twice) without Apple assistance and has subsequently incorporated support for it into the company’s Airfoil software, which more broadly taps into an OS X- or Windows-based computer’s audio subsystem and redirects the bitstream over the network to an Apple TV or Airport Express. The last time I ran Airfoil, a few weeks ago, it worked fine. Last night, however, my attempt to use the program was unsuccessful; it ’saw’ the Apple TV, but wouldn’t subsequently send audio to the laptop’s LAN client peer.
In true engineer fashion, my first question was ‘what’s changed.’ ‘Firefox’ was the fairly rapid answer, since I was using it to connect to Pandora’s servers, and since I’d been running v3.5 the last (successful) time. I switched to Internet Explorer, and Airfoil once again worked fine, thereby somewhat removing the Flash plugin from root-cause consideration. I’d recently upgraded to Flash 10.1, although given that the Flash plugin runs as an ActiveX control with IE but in a non-ActiveX fashion with Firefox and other browsers (thereby leading to two different installation utilities), Flash-on-Firefox still could have been the culprit.
To fully remove Adobe’s add-on from suspicion, I hit up Google’s search engine, which disgorged two relevant links from Rogue Amoeba’s site, one a support knowledge base writeup, the other a corporate blog post. I’ll quote from the latter below (links are from the original author):
When Google Chrome was released, one of the things that set it apart from other browsers was the fact that each tab you open gets its own process. One of the compelling reasons for this new feature is that certain browser plugins are rather infamous for causing instability and memory leaks which can cause your browser to crash. Under the new model introduced by Google Chrome however, only the tab that has that plugin running will crash, leaving everything else intact.
This idea turned out to be so great that Microsoft borrowed the idea for Internet Explorer 8. The latest version of Firefox (3.6.4), which was just released, takes a slightly different approach, but the end result is the same - plugins run in their own process, isolated from everything else.
While this is great news for browser stability, it is bad news for people who want to use Airfoil for Windows to grab audio from these browsers. When you hijack an application with Airfoil, it grabs the audio from the process you select and starts sending it to your remote devices. The problem with this new browser paradigm is that Airfoil can only grab audio from one process at a time and it doesn’t know which of the many processes that your browser has started is actually playing the audio:
Rogue Amoeba’s documentation provides several workarounds, including regressing to older versions of Firefox and Internet Explorer for browser-based music streaming purposes, disabling Firefox 3.6’s sandboxing capabilities, or relying on Apple’s Safari browser (which doesn’t as yet offer the sandboxing security and stability enhancement).
I could have gone back to Firefox 3.5, which is still supported by Mozilla. However, since I’m still running Internet Explorer 7, thereby explaining why my IE experiment with Airfoil and Pandora worked fine, I’ll go this route for now. Note that this issue only affects Windows-based browsers; I can stream Pandora from my Macs running Chrome v6, Firefox v3.6 and Safari v5 just fine. And as for Windows, I’m hopeful a more encompassing Rogue Amoeba workaround for this well-intended but problem-causing browser enhancement will soon arrive:
We recognize that this isn’t the ideal solution. It is just a short term workaround to get you back up and running today. In the meantime, we’re working hard to make Airfoil for Windows capable of grabbing audio from all browsers.