JSound()
Last Updated: August 21, 2019 12: 29
This library provides your project a sound to make it more attractive.
Due to modern browsers blocking autoplay, this library might not work sometimes. You may receive a "Uncaught (in promise) DOMException" error on your console.
Usage:
1 new JSound("path/to/music.format");
Functions
JSound.play()
- plays the sound
JSound.pause()
- pause the sound
JSound.loop()
- makes the cound loop infinitely
JSound.unloop()
- remove the loop property