diff options
Diffstat (limited to 'dom/base/test/file_webaudioLoop2.html')
-rw-r--r-- | dom/base/test/file_webaudioLoop2.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dom/base/test/file_webaudioLoop2.html b/dom/base/test/file_webaudioLoop2.html new file mode 100644 index 0000000000..8453a436d1 --- /dev/null +++ b/dom/base/test/file_webaudioLoop2.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<script> +var ac = new AudioContext(); +fetch("audio.ogg").then(response => { + return response.arrayBuffer(); +}).then(ab => { + return ac.decodeAudioData(ab); +}).then(ab => { + var src = ac.createBufferSource(); + src.buffer = ab; + src.loop = true; + src.start(); + src.connect(ac.destination); +}); +</script> |