function init() {
// Fix up prefixing
window.AudioContext = window.AudioContext || window.webkitAudioContext;
context = new AudioContext();
// BufferLoader takes: (context, url, callback)
bufferLoader = new BufferLoader(
context,
[
'http://localhost:8085/atari_sound.mp3',
'http://localhost:8085/mario_walk.wav',
'http://localhost:8085/bomb.mp3'
],
finishedLoading
);
bufferLoader.load();
}
So I'm using nginx to run localhost:8085, and I keep trying to load these sounds but I keep getting this error:
"XMLHttpRequest cannot load http:// localhost:8085/bomb.mp3. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access."
I understand that javascript won't do crossdomain requests but it worked before and now all of a sudden it isnt working. Any ideas?