diff --git a/examples/resources/js/benchmark.js b/examples/resources/js/benchmark.js index 535243a..7dd6172 100644 --- a/examples/resources/js/benchmark.js +++ b/examples/resources/js/benchmark.js @@ -113,6 +113,7 @@ function startBenchmark() { let audioElement = document.createElement('audio'); audioElement.src = 'resources/cube-sound.wav'; + audioElement.crossOrigin = 'anonymous'; audioElement.load(); audioElement.loop = true; let audioElementSource = audioContext.createMediaElementSource(audioElement); diff --git a/examples/resources/js/birds.js b/examples/resources/js/birds.js index 8d191cd..15d0992 100644 --- a/examples/resources/js/birds.js +++ b/examples/resources/js/birds.js @@ -148,6 +148,7 @@ function initAudio() { Math.round(Math.random() * (audioSources.length - 1)); audioElements[i] = document.createElement('audio'); audioElements[i].src = audioSources[birdIndex]; + audioElements[i].crossOrigin = 'anonymous'; audioElements[i].load(); audioElements[i].loop = true; audioElementSources[i] = diff --git a/examples/resources/js/hello-world.js b/examples/resources/js/hello-world.js index b6c1a6a..6fe073c 100644 --- a/examples/resources/js/hello-world.js +++ b/examples/resources/js/hello-world.js @@ -36,6 +36,7 @@ function initAudio() { // Create an audio element. Feed into audio graph. audioElement = document.createElement('audio'); audioElement.src = 'resources/cube-sound.wav'; + audioElement.crossOrigin = 'anonymous'; audioElement.load(); audioElement.loop = true; diff --git a/examples/resources/js/room-models.js b/examples/resources/js/room-models.js index 1e8af11..4f2e403 100644 --- a/examples/resources/js/room-models.js +++ b/examples/resources/js/room-models.js @@ -94,6 +94,7 @@ function initAudio() { for (let i = 0; i < audioSources.length; i++) { audioElements[i] = document.createElement('audio'); audioElements[i].src = audioSources[i]; + audioElements[i].crossOrigin = 'anonymous'; audioElements[i].load(); audioElements[i].loop = true; audioElementSources[i] = diff --git a/examples/resources/js/treasure-hunt.js b/examples/resources/js/treasure-hunt.js index fca9826..9bf2ab7 100644 --- a/examples/resources/js/treasure-hunt.js +++ b/examples/resources/js/treasure-hunt.js @@ -207,6 +207,7 @@ function initAudio() { source = audioScene.createSource(); audioElement = document.createElement('audio'); audioElement.src = 'resources/cube-sound.wav'; + audioElement.crossOrigin = 'anonymous'; audioElement.load(); audioElement.loop = true; audioElementSource = diff --git a/examples/resources/js/vs-pannernode.js b/examples/resources/js/vs-pannernode.js index c68b9f2..4d67fc2 100644 --- a/examples/resources/js/vs-pannernode.js +++ b/examples/resources/js/vs-pannernode.js @@ -93,6 +93,7 @@ function initAudio() { let audioSource = 'resources/cube-sound.wav'; audioElement = document.createElement('audio'); audioElement.src = audioSource; + audioElement.crossOrigin = 'anonymous'; audioElement.load(); audioElement.loop = true; audioElementSource =