alert

Play Sound Alerts

Play Sound Alerts

alert = require('alert')
 
alert() // Plays default alert "bottle" 
alert('purr')
alert.volume(0.5)

See content.js for all available sounds.

Try it at requirebin

$ npm install alert
  • bottle (default)
  • glass
  • funk
  • morse
  • purr
  • tink
  • submarine
alert.content['foo'] = 'http://bar.com/foo.mp3'
alert('foo')
alert.player.src()
// => foobar.mp3 
 
alert.player.on('ended', function(){})

More info is at azer/play-audio