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 I don't want the song to autoplay, so I'm using:
player.track = objTrack;
player.context = objTrack.album;
But when I do so, either it won't work at all or it will start playing the first track of the album regardless which track I set.
How can I make this work? :/ Thanks.
This does not do the trick either. I'm currently trying this method:
var album = m.Album.fromURI('spotify:album:7Kmmw7Z5D2UD5MVwdm10sT', function(album) {
var player = new v.Player();
player.track = album.get(3);
player.context = album;
document.body.appendChild(player.node);
});
But this will not fetch and play track number 3, it will play the first track of the album. And if the album only contains 1 track, it will crash. Any ideas?