Allows you to play audio using FFplay.
var FFplay = ;var player = "./path/to/sound/file.wav"; // Loads the sound file and automatically starts playingplayer; // Pauses playbackplayer; // Resumes playbackplayer; // Stops playback.// The player can't play again after being stopped,// so you should remove itplayer = null;
You can also pass custom options when you construct
FFplay like so:
var player = new FFplay("./path/to/sound/file.wav", ["-ss 12", "-nodisp", "-autoexit"]);
-autoexit flags are set by default, but if you provide an array of options, you will have to manually specify them.