Closed scottwvw closed 9 years ago
@scottwvw take a look at:
// to load PLAYLIST and resolve it's data
scPlayer.resolve('http://soundcloud.com/jxnblk/sets/yello', function (err, playlist) {
// do smth with array of `playlist.tracks` or playlist's metadata
// e.g. display playlist info in a view etc.
console.log(playlist);
// once playlist is loaded it can be played
scPlayer.play();
// for playlists it's possible to switch to another track in queue
// e.g. we do it here when playing track is finished
scPlayer.on('ended', function () {
scPlayer.next();
});
// play specific track from playlist by it's index
scPlayer.play({playlistIndex: 2});
});
Maybe you have some specific question?
Has anyone got an example of using this tool with playlists? The single example works great but I'm having trouble getting it to work with a playlist and pulling in the individual track data