I'm trying to stream a track from soundcloud using their Javascript SDK, but I keep getting a 404 when asking for the stream url.
I tried multiple ways including:
$(document).ready(function() {
SC.initialize({
client_id: "CLIENT_ID",
});
playTrack();
});
var playTrack = function() {
SC.stream("/i1/tracks/137078163", function(sound) {
sound.play();
});
}
which returns a 404.
client = Soundcloud.new(:client_id => 'YOUR_CLIENT_ID')
track = client.get('/tracks/293')
stream_url = client.get(track.stream_url, :allow_redirects => true)
also returns a 404.
The only way I got it to work was using a different stream url on SO, but I'd like to know why using their JS SDK doesn't work.