Need help with play-sound?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

shime
145 Stars 30 Forks MIT License 81 Commits 19 Opened issues

Description

Play sounds by shelling out to one of the available audio players.

Services available

!
?

Need anything else?

Contributors list

# 30,695
ruby-on...
elastic
react-a...
Express
50 commits
# 152,403
JavaScr...
Sass
pmd
oauth2-...
12 commits
# 79,791
TypeScr...
repl
systemj...
coffees...
2 commits
# 342,812
JavaScr...
Node.js
node
HTML
2 commits
# 106,504
phantom...
Chrome
HTML
serverl...
2 commits
# 520,420
JavaScr...
node
Shell
2 commits
# 631,014
JavaScr...
Node.js
node
1 commit
# 132,624
node
HTML
Shell
fulltex...
1 commit
# 2,608
JavaScr...
CSS
smartho...
Raspber...
1 commit

play-sound

Build Status Downloads

Play sounds by shelling out to one of the available audio players.

Installation

npm install play-sound

Examples

var player = require('play-sound')(opts = {})

// $ mplayer foo.mp3 player.play('foo.mp3', function(err){ if (err) throw err })

// { timeout: 300 } will be passed to child process player.play('foo.mp3', { timeout: 300 }, function(err){ if (err) throw err })

// configure arguments for executable if any player.play('foo.mp3', { afplay: ['-v', 1 ] /* lower volume for afplay on OSX */ }, function(err){ if (err) throw err })

// access the node child_process in case you need to kill it on demand var audio = player.play('foo.mp3', function(err){ if (err && !err.killed) throw err }) audio.kill()

Options

Prior art

  • play.js - play sound files from node.js to your speakers

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.