How Can I Avoid CORS Restriction For Web Audio Api?
I trying to create some visualization for audio-stream. But I run into CORS trouble when I try get access to raw audio data with createMediaElementSource() function. Is there a way
Solution 1:
There are five ways to deal with the protections against cross-origin retrieval:
- CORS headers -- this is ideal, but you need the cooperation of the third-party server
- JSONP -- not appropriate for streaming content and you typically need the cooperation of the third-party server
- Iframes and inter-window communication -- probably not appropriate for streaming content and you need the cooperation of the third-party server
- Turning off browser protections -- you need to be running the browser in a custom mode, and you should not use that browser for anything else
- Server-side proxy -- comparatively slow but often the only feasible option
Post a Comment for "How Can I Avoid CORS Restriction For Web Audio Api?"