Open michaelbromley opened 9 years ago
This one's been stumping me too. Any progress on this?
Awesome visualiser by the way. After reading your tutorial I'm attempting one now combined with three.js to get create some 3d visuals.
Hi - thanks! No, I've not done anything on this issue, although I read somewhere recently that Firefox does not allow remote sources for Web Audio, so this may well be the issue. More info here: http://stackoverflow.com/questions/28984883/cannot-analyse-soundclouds-streaming-audio-because-of-the-lack-of-cors-policy
Someone suggests a solution here - I've not time to test this out right now but if you get it to work, please let me know!
Yes, the solution is:
audioElement.crossOrigin = "anonymous";
You can find more informations about it on MDN - CORS settings attributes.
This is also a "problem" in Chrome >= 42.
Thanks @TimPietrusky. Just noticed that Chrome had updated to v42 on my machine and the visualization stopped working there too. Adding the line you suggest fixes it, but not for every track.
Needs more investigation...
@michaelbromley can you give me a track URL that's not working? Because I'm using the fix in my project and it's working for every track I try.
Yeah try this: https://soundcloud.com/muse/undisclosed-desires
I debugged this again and I found out that some of the SoundCloud streaming servers are not sending the CORS-header to allow cross-origin access.
The CORS-problem was reported to SoundCloud one month ago.
Used to work fine. I was recently made aware that it doesn't play anymore. No error message in console. Album art loads, which means API call to SoundCloud is working ok. Track data seems to buffer judging by visual cue on the player control, but playback doesn't start, even when pressing the play button.