Open ThatTonybo opened 5 years ago
I have Win10 with mplayer
installed and my PATH
set to mplayer's directory.
In my case, the problem seemed to be that play-sound
was looking for mplayer
. And, although, mplayer
can be found from Command Prompt terminals, the same is not true for Bash terminals.
For Bash, what works, instead, is mplayer.exe
.
So, the solution for me was...
const playSoundPlayers = [
'mplayer',
'afplay',
'mpg123',
'mpg321',
'play',
'omxplayer',
'aplay',
'cmdmp3'
];
const players = playSoundPlayers.concat(playSoundPlayers.map(x => `${x}.exe`));
player.play(mp3File, {players: players}, (err: any) => { });
I've run into an error when I try to run this code.
Is anyone able to provide some insight into this?