示例#1
0
 function addRestoredSongs(playlist, songIndex) {
   var restoredSong = playlist.songs[songIndex];
   if (restoredSong) {
     soundCloudService.getSong(restoredSong.permaLinkUrl).then(function (song) {
       song.votes = restoredSong.votes;
       return enhancedPlayer.add(song);
     }).then(function () {
       var nextSongIndex = songIndex + 1;
       addRestoredSongs(playlist, nextSongIndex);
     }).done();
   }
 }
示例#2
0
 function add(url) {
   soundCloudService.getSong(url).then(function (song) {
     enhancedPlayer.add(song);
   }).done();
 }