Drop Locker
From Music Hack Day
Contents |
[edit] Drop Locker
MP3s. You love them and you hate them. But most of all, you don't stream them through Spotify. Until now.
[edit] Creators
- Evan Shrubsole
- Jamie Kirkpatrick
- Joakim Carlsson
- Johan Lindström
- Johannes Koggdal
- Mark Obcena
- Mattias Arrelid
- Oskar Grenholm
[edit] About the Hack
- 1998. The year when ID3v2 ruled the world
- 2012. The year when Spotify introduced a hack for supporting streaming (and playing) MP3s (e.g. from Dropbox)
How does this work? That's a great question! There are a few steps you'd need to do:
- Authenticate with service X (in this case, we've provided a sample Spotify app that authenticates against Dropbox)
- List tracks (incl. metadata like artist information, file types, URL for streaming) available from service X
- Abuse the Spotify URI scheme to represent such tracks, like spotify:external:dropbox:Todd+Terje:Inspector+Norse:Inspector+Norse:401:audio%2fmpeg:%2fTodd+Terje+-+Inspector+Norse.mp3, and tell Spotify about them
That's it! Now that you've done the hard work, we thought it would be a nice idea to fix a few more things once and for all:
- Introduce a new HTTP streamer (and player) in the Spotify core library
- Parse the newly introduced Spotify URI scheme to have it invoke the HTTP streamer (and player) whenever it needs to play such a track
This isn't rocket surgery (see what we did there?), and it's actually quite nice in practice - just provide a service that authenticates and produces URIs according to the above scheme, and Spotify will be able to play them!
[edit] Technology used
Some HTTP requests, some audio queues, and a few midgets well-versed in C++
[edit] Media
There's a video of this miracle in action right here.
Here is the presentation from the demos http://www.ustream.tv/channel/music-hack-day-reykjav%C3%ADk-2012 starting at 42:00
[edit] Source Code and Links
N/A.

