Found, at least for firefox. Elements <audio>seem to have stronger CORS rules than I understood! I set the header Access-Control-Allow-Origin: *on my file server because I knew it was on a different port, and then when Karma runs my tests, but apparently this is not enough.
, , - CORS . , scriptProcessors <audio> crossOrigin, <img> <canvas>.
, ,
var audioElement = new Audio();
audioElement.src = "http://localhost:9877/audio.wav";
var audioElement = new Audio();
audioElement.crossOrigin = "anonymous";
audioElement.src = "http://localhost:9877/audio.wav";
firefox, , , , (, ?).
, chrome , .play(), , ended.. , , , . , canplaythrough, .play(), , , .