shime / play-sound

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

Cannot play Audio from url #27

Closed ghost closed 5 years ago

ghost commented 5 years ago

I've been trying all day to find a simple module that plays sound without a bunch of errors in nodejs, and play-sound has been one of the best so far. It works fine playing local audio, but when I try to play audio from a URL, it throws an error. I would prefer not to download the file to the user's computer then play it.

I am using this code and it throws an error: player.play('https://audiocdn.bithop.stream/piano/0g.mp3', function (err) { if (err) throw err; console.log("Audio finished"); });