I'm developing a player using soundcloud API, and just noticed that some of the tracks are not playing (it's rare). I'm using web audio API so i know about the crossorigin thing.
I have checked the response headers for a track that i'm able to play:
HTTP/1.1 200 OK
Content-Type: audio/mpeg
Content-Length: 1397654
Connection: keep-alive
Date: Tue, 21 Apr 2015 16:45:36 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, HEAD
Access-Control-Max-Age: 3000
x-amz-version-id: Fzg9P1JZimAcyjx6BXUu0MIC91RDDPeN
x-amz-meta-bitrate: 128
x-amz-meta-job: L0mYPThacnlZ
x-amz-meta-duration: 87360
Cache-Control: max-age=252460800
Last-Modified: Tue, 21 Apr 2015 16:36:59 GMT
ETag: "e9c87fb564a5fb9a5ae68759d7cbbb3e"
Accept-Ranges: bytes
Server: AmazonS3
Age: 259
X-Cache: Hit from cloudfront
Via: 1.1 2ce6276171358bf7d052aa190ed98f8d.cloudfront.net (CloudFront)
X-Amz-Cf-Id: zIMj84au8CKYPGA6xqyTetn2N9t489gbwpTBriBYqj9k-ec8DgwxTw==
compared to a track that i'm unable to play:
HTTP/1.1 200 OK
Content-Type: audio/mpeg
Content-Length: 5245804
Connection: keep-alive
Date: Tue, 21 Apr 2015 12:09:06 GMT
x-amz-version-id: PAXoRvx.as8.0x.fQWCj6orn7ftbQ_fq
x-amz-meta-bitrate: 128
x-amz-meta-job: ahV2tKo4BhuV
x-amz-meta-duration: 327892
Cache-Control: max-age=252460800
Last-Modified: Tue, 21 Apr 2015 11:16:57 GMT
ETag: "396cddee1091ddab22e88f86220428e4"
Accept-Ranges: bytes
Server: AmazonS3
Age: 16846
X-Cache: Hit from cloudfront
Via: 1.1 690dec7c91091903b0d306bae0caac87.cloudfront.net (CloudFront)
X-Amz-Cf-Id: ILlJV8NGjF47NbijHmKhc4OJ9XGL3rU86NcbffzOI2H_rHUFCnt-7A==
Access-Control headers are missing in the latter case. Is this a configuration issue on soundcloud's side, or is this common for newly uploaded tracks? (I don't remember seeing this problem with older tracks)
EDIT: i'm 90 percent sure that all tracks from cf-media.sndcdn.com have this issue, while tracks from ec-media.sndcdn.com are working fine.
MediaElementAudioSource outputs zeroes due to CORS access restrictions for <stream_url>
– TimPietrusky