Answers for "js audio loop delay"

2

how to loop audio in js

myAudio = new Audio('someSound.ogg'); 
if (typeof myAudio.loop == 'boolean')
{
    myAudio.loop = true;
}
else
{
    myAudio.addEventListener('ended', function() {
        this.currentTime = 0;
        this.play();
    }, false);
}
myAudio.play();
Posted by: Guest on May-16-2020
1

javascript audio delay

const AudioContext = window.AudioContext || window.webkitAudioContext;
const audioCtx = new AudioContext();
Posted by: Guest on September-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language