Skip to content Skip to sidebar Skip to footer

Soundcloud Stratus Player Won't Dynamically Add More Than An Individual Track At A Time

Thanks to other people's questions, I have gotten AJAX links to work for individual songs when clicked in the DOM. My problem is that I need to find a way to load all of the track

Solution 1:

I don't know about the stratus player, but in general - if you want to retrieve a list of tracks of a specific user - given that you know the user's id, you indeed have to make a call to the soundcloud API. You can do it like this:

  SC.initialize({
      client_id: "YOUR_CLIENT_ID",
      redirect_uri: "http://example.com/callback.html",
  });

/**
Once that's done you are all set and ready to call the SoundCloud API. 
**/

/**
Call to the SoundCloud API. 
Retrieves list of tracks, and displays a list with links to the tracks showing 'tracktitle' and 'track duration'
**/

  var userId = 39090345; // user_id of Prutsonic

  SC.get("/tracks", {
      user_id: userId,
      limit: 100
  }, function (tracks) {



      for (var i = 0; i < tracks.length; i++) {
          console.log(tracks[i].title);
      }

  });

You can try my fiddle here: http://jsfiddle.net/tobiasbeuving/26pHX/5/

Cheers, T


Post a Comment for "Soundcloud Stratus Player Won't Dynamically Add More Than An Individual Track At A Time"