Continuous Cross-Page Music Player

While working on Aaron Keyes’ new website at Eclipse, he asked if we could put a music player on it. He wanted to stream his entire newly released album and have it play continuously for the user, no matter what page they were on. The options were to have the player in an iFrame (bad for obvious reasons) or have it pop up in a separate window for the user to keep open. After we decided on the latter and I started working on it, I came up with the idea of using cookies in a creative way to achieve what he wanted.
I ended up choosing to do the player in Flash because it has great built-in sound functionality, and I didn’t have time to try to do it in Javascript (we were rushing to get the site done in time for the release date). Another good thing about Flash is that its cookies are a little bit more “persistent,” and I wouldn’t have to worry about too many people blocking normal cookies in their browser.
So I made a normal music player with the basic functions: play, pause, stop, next, previous, volume slider, and song title. I also set the player to autoplay through the whole album. In order to make the songs play continuously, I had to use my cookie idea. I made the player set a cookie (the song id) every time the song changed. It also sets a cookie every couple of milliseconds to track the progression in the current song’s timeline. As soon as the player is reloaded (either by going to a different page or coming back after leaving the site), it gets the cookies and starts right where it left off (unless it has been paused, where it just loads the last played song in the right spot). This meant that the user could navigate through the different pages in Aaron’s site, and the music would continuously play! (with a slight pause in between pages, depending on how fast the user’s connection is)
Visit Aaron’s website to see (hear) the player in action! (Its in the top right)
