javascript - How can I avoid CORS restriction for web audio api? -
i trying create visualization audio-stream. run cors trouble when try access raw audio data createmediaelementsource()
function.
is there way avoid restriction , raw audio data stream on other origins? perhaps using websockets?
there 5 ways deal protections against cross-origin retrieval:
- cors headers -- ideal, need cooperation of third-party server
- jsonp -- not appropriate streaming content , typically need cooperation of third-party server
- iframes , inter-window communication -- not appropriate streaming content , need cooperation of third-party server
- turning off browser protections -- need running browser in custom mode, , should not use browser else
- server-side proxy -- comparatively slow feasible option
Comments
Post a Comment