Trying to play a specific track from an album with the player view. It works all good when using
player.play(objTrack, objTrack.album);
But
If you have the current track number I suppose you got it from a track object. Here is my way:
// trackObj <- The track object
var album = m.Album.fromURI('spotify:album:7Kmmw7Z5D2UD5MVwdm10sT', function(album) {
var player = new v.Player();
player.track = trackObj;
album.get = function() {
return trackObj;
}
player.context = album;
document.body.appendChild(player.node);
});