JS Sound
var audio = new Audio('assets/audio.mp3');
> Play
audio.play();
> Stop
sound.pause();
> Back to start
sound.currentTime = 0;
Code Cat
var audio = new Audio('assets/audio.mp3');
> Play
audio.play();
> Stop
sound.pause();
> Back to start
sound.currentTime = 0;
var audio = new Audio('audio_file.mp3');
audio.play();
const sound = require("sound-play");
sound.play("file.mp3");