In the Soundcloud Javascript SDK, how do I correctly send a 'filter' parameter to the '/tracks' endpoint? -


i'm trying filter tracks search return tracks "streamable."

sc.get('/tracks', { q: query, filter: "streamable" }, function(sound) {     console.log(sound); }); 

the way have written above, i'm still getting tracks have "streamable" property set false.

the documentation vague regarding how include parameter(https://developers.soundcloud.com/docs/api/reference#tracks):

filter enumeration (all,public,private,streamable,downloadable)

has tried before? proper way send parameter , filter results include streamable tracks?

streamable-filter boolean. try way:

sc.get('/tracks', { streamable:true}, function(sounds) { (i = 0; < sounds.length; i++) {     console.log(sounds[i].stream_url + ' - '+ sounds[i].streamable); } }); 

http://jsfiddle.net/iambnz/s74apqfs/


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -