Created
December 19, 2011 08:21
-
-
Save ThisIsMissEm/1496059 to your computer and use it in GitHub Desktop.
Least amount of code to get a playable spotify album cover within the context of a spotify app. Suggestions welcome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var m = sp.require("sp://import/scripts/api/models"), | |
v = sp.require("sp://import/scripts/api/views"), | |
dom = sp.require('sp://import/scripts/dom'); | |
var someContainer = dom.queryOne('.someClass'); | |
m.Album.fromURI("spotify:album:2d7CiSgCNMiSjE9UG3sdTX", function(context){ | |
var player = new v.Player(); | |
player.context = context; | |
dom.adopt(someContainer, player.node); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got it working - see here for details http://stackoverflow.com/questions/11718663/how-can-i-make-a-large-album-player-using-spotify-apps-api