0
評論代碼失敗。未註釋的代碼有效。 Soundcloud對象SC獲得一個特定音軌的正確代碼是什麼?如何爲特定曲目調用soundcloud sdk
/*
SC.stream('/tracks/259637476', function(sm_object){
var track = {
id: 259637476,
title: 'Time is your most valuable and scarcest resource',
artist: 'Ceiteach',
url: sm_object.url
};
$rootScope.$apply(function() {
$rootScope.songs.push(track);
});
}) ;
*/
SC.get("/groups/55517/tracks", {
limit: 5
}, function(tracks) {
for (var i = 0; i < tracks.length; i ++) {
SC.stream('/tracks/' + tracks[i].id, function(sm_object){
var track = {
id: tracks[i].id,
title: tracks[i].title,
artist: tracks[i].genre,
url: sm_object.url
};
$rootScope.$apply(function() {
$rootScope.songs.push(track);
});
});
}
});