Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

sound in loop javascript code example

Example: 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();

Tags:

Javascript Example

Related

error 500 - internal server error code example flexbox wrap width code example suprrimer divider entre ion-item code example send an html with node mailer code example what is count occurrences javascript code example background gradient transition css code example linux set git editor to vscode code example how to check a palindromic prime number in python code example windows rename file sentence cas code example castarray to list java code example take user input in array in java code example how to display data in the terminal node code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy