CORS with XMLHttpRequest not working
17:04 13 Aug 2014

I'm trying to read the audio stream using XMLHttpRequest, but get an error "XMLHttpRequest cannot load . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access". I tried to use CORS from this example



  
    
    AUDIO
  
  
    

. If I put url into audio html tag like this



  
    
    AUDIO
  
  
    
  
, then it works. What should i do, to use it with XMLHttpRequest?

javascript html xmlhttprequest