shime / play-sound

Play sounds by shelling out to one of the available audio players.
MIT License
207 stars 31 forks source link

Unable to use arguments with portable executables #48

Closed RiskyRomero closed 2 years ago

RiskyRomero commented 2 years ago

Say I have a portable executable downloaded, and adjust my code as such:

var player = require('play-sound')({player: "/path/to/downloads/mplayer/mplayer.exe"})
player.play('foo.mp3', { "mplayer": ['-loop', 0] }, function(err){})

I'm unable to get the arguments to work. However, if I adjust my code to use mplayer that has been installed on the command line, the arguments work and the song loops

var player = require('play-sound')({player: "mplayer"})
player.play('foo.mp3', { "mplayer": ['-loop', 0] }, function(err){})

So, how do I get the args to work on a portable mplayer? It plays but doesn't loop.