Don’t you love it when you add one cool thing to another cool thing to get something even better?
I do.
Root beer is good. Ice cream is good. Root beer floats are fantastic. Daphne was good. Velma was good. Add them together and you had the Scooby Doo gang (well the only members worth watching anyway).
So Songbird is good. Nay, Songbird is great (okay so I’m a little biased). Last.fm is good.
Songbird + Last.fm is yabba-dabba-doorific.
Here’s a really simple example I threw together to familiarise myself with the Webpage API. It’s perhaps not the greatest, but it is pretty straight-forward, so hopefully it’s of use to others. Basically it adds listeners to the Songbird events that monitor when the tracks change. It then makes AJAX queries to Last.fm to load album cover information (including cover art), tag information for the current track, and a list of similar artists – all using Songbird’s wicked powerful Webpage API and Last.fm’s handy dandy XML web services APIs. On the right hand side, it does some somewhat unrelated tag-clouding of your own media library. Yeah – it’s not related to Last.fm, but I wanted to try it. So sue me.
So this is just a mere example of the kind of goodness that comes from two open APIs adding up to a whole that’s greater than the sum of its parts.













8 Comments
SubscribeI should probably note, since AJAX queries can’t cross domains (XSS security exploits are bad!), this made use of a really simple PHP proxy script (the last-fm.php script referenced in the AJAX query) to forward requests from my whacked.net domain over to Last.fm.
This is sweet, but when are we going to see an audioscrobbler plugin that works with the 0.3 RCs?
Whoa, nice!
“AJAX queries can’t cross domains (XSS security exploits are bad!)”
https://bugzilla.mozilla.org/show_bug.cgi?id=xxx
Probably sometime after the 0.3 release.
Everyone is focused pretty hard on making 0.3 rock – so some of the extension love will come after we solidify the core app.
Thanks Dao – I’ll check that out!
This is great! I’d put a message up in the page if you view it with anything but Songbird.
In fact, this is so great I’d suggest making this into some sort of extension that creates a persistent tab or something.
Oh, and when the player plays a track that only has the title metadata, you don’t update the artist album in the page with blanks.