Porting Pandora to the Desktop
May 3rd, 2008
Author: Michael Krotscheck
Category: Articles
Tags: air, desktop, drunken coding, flash, flex, pandora
So there I was, hacking away at AIR, and my iPod runs out of batteries. I was in that rare coding zen where you really need the audio to lock you out from the rest of the world, so I was fairly annoyed that the random conversation here at Apropos suddenly started to interfere with my productivity. No worries though, I could always resort to Pandora, right?
Now, I’m not a big fan of Pandora. Don’t get me wrong, I love what they’re doing and have found some phenomenal music there, but the fact that I always have to keep a browser window open to make use of their service has kindof annoyed me, and now was no different. I could deal with it though for the sake of productivity…. until I realized that AIR came with its own embedded WebKit browser.
Two beers and some experimentation later (apparently Webkit doesn’t like running on a transparent window), I am now sitting on an application I shall dub “PandorAIR”, because it’s an AIR port of Pandora. There’s not much to it- there doesn’t have to be- but for what it’s worth it’s a clean little application that I’m fairly certain others would be interested in adopting. You will need to download and install the AIR runtime environment first, but once you’re done with that you’re golden. I’ll work on putting an Installer Badge here as soon as I have the time.
Note that during the install it’s going to complain at you twice: Once because this application isn’t digitally signed, and once because AIR requests unrestricted access to your desktop. To fix the former… well, if you have a spare THAWTE certificate lying around I’d be grateful: that will uniquely identify myself as the distributor. As for the latter, well, I’m afraid you’re just going to have to take my word that I’m not trying to do nefarious things to your desktop (given that my professional credibility hinges on it, that should be easy).
Caveat: It’s a bit of a memory Hog- 60MB. Trying to figure out how to fix that.

Very nice Mike! I was thinking about making one, but figured there had to be one out there by now. Little did I know a co-worker would make it!
HA!
There are still a few bugs in it, but I’ll be ironing those up soon enough. For instance, on windows it stops playing after you minimize it and the buffer clears. Also I’d like to add the option to have both the large format player and the small format player, and lastly I want to make it auto-scrub the HTML page for the current version of the .swf. All in due time, once I have a chance to poke around with it
Mike - this is freaking awesome. I saw your mention on twitter, and as an avid user of pandora had to nab it!
Michael, this is amazing! I love the small, dedicated, and ad free window, as well as the release from the fear of browser crashing ending my tunes. I was initially excited to minimize it to my tray…but I’ll wait patiently for that fix
Mike,
Please explain to the rest of us how to install and use your application.
Thanks.
Ivan
Hey there, Ivan! Internet Explorer 7 has an annoying tendency to download the file as a .zip file rather than a .air file. If that’s the problem you’ve run into, just change the extension once it’s downloaded and the AIR installer will pick it up no problem. If not, can you go into a little more detail on what problems you’re having?
Very, very cool, Mike. I’m assuming that because it’s mainly web-based, it’ll still work fairly well with any Pandora upgrades?
I’ve had no problem with it stopping on minimize on Windows. There was a short gap at first, but that’s it.
Not yet- the player’s hard coded to a particular version, but I’m working on deriving the player source from the original HTML page. Similarly, the minimization in windows is intermittent by system, but I’ve gotten some good feedback that’ll help me fix that- launch the window as a utility type so it won’t show up in the task bar, and then moving it off screen rather than minimizing it. It’s a poor man’s hack, but for the time being I’m more interested in lowering adoption barriers than clean code. For clean code, there’s my desktop app
Just found your app Googling “pandora AIR” and it works beautifully. Thanks for making this great app for AIR.
Really nicely done, thanks.
There is an official version of this that we use in the office all th time:
http://www.pandora.com/desktop
I have no idea if that is related to your work.
I was aware of it almost the week it came out. After decompiling it I noticed that they’re running into some of the same problems I was, and really they’re not doing anything different- I’m just encapsulating the mini player rather than the large player.
Having said that, I’m not about to pull my app, but I do invite others to go use the official version- I just wanted something that did what I wanted it to do, and at the time it wasn’t available yet.