soundcloud / soundcloud-javascript

Official SoundCloud Javascript SDK
http://developers.soundcloud.com/
Other
386 stars 83 forks source link

Having issues streaming certain tracks with SDK3.0 #37

Open mariussunde opened 8 years ago

mariussunde commented 8 years ago

Hi, after switching from SDK2.0 and using only SC.stream() to SDK3.0 and using resolve to find the ID, certain tracks won't play.

No error messages given, they simply will not play.

Examples of tracks that are not playing: https://soundcloud.com/dreamchasersrecords/meek-mill-pray-for-em https://soundcloud.com/gangstagibbs/hot-boys-produced-by-dupri-of-league-of-starz

Examples of tracks that are playing fine: https://soundcloud.com/kanyewest/nomorepartiesinla https://soundcloud.com/amirobe/amir-obe-before-the-vomit-produced-by-oz

They were all playing when I was using SDK2.0 and supplying the ID of the song,

Any ideas? Very frustrating! Thanks.

My playSong() function

Edit: Also made a small codepen showing the issue: http://codepen.io/mariussunde/pen/mVxKPO Last track does not work

Edit 2: Safari also gives me these errors;

[Error] Failed to load resource: Request header field Accept-Encoding is not allowed by Access-Control-Allow-Headers. (242557602.json, line 0)

[Error] XMLHttpRequest cannot load https://api.soundcloud.com/tracks/242557602.json?client_id=9e05e349251475056d1bc81acbf08c71&secret_token=tracks. Request header field Accept-Encoding is not allowed by Access-Control-Allow-Headers.

Now my question here is, is this something I can fix on my own server, or does the issue lie with soundcloud?

lukephills commented 8 years ago

Hi, the recent update to the API should have fixed these Safari issues for you.

https://connect.soundcloud.com/sdk/sdk-3.1.2.js