1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-06-11 19:08:36 +00:00
Files
UXP/dom/base/test/file_webaudioLoop2.html
T

16 lines
325 B
HTML

<!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>