Skip to content

Commit

Permalink
Merge pull request #9 from mgorzel/fix-firefox-playback
Browse files Browse the repository at this point in the history
Fix Firefox playback issue
  • Loading branch information
drewbitllama authored Apr 26, 2018
2 parents 762bcf9 + b897b4b commit c69e41d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/resources/js/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions examples/resources/js/birds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
1 change: 1 addition & 0 deletions examples/resources/js/hello-world.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions examples/resources/js/room-models.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
1 change: 1 addition & 0 deletions examples/resources/js/treasure-hunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
1 change: 1 addition & 0 deletions examples/resources/js/vs-pannernode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit c69e41d

Please sign in to comment.