alert

Play Sound Alerts

npm install alert
13 downloads in the last week
122 downloads in the last month

alert

JavaScript library to 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

Install

$ npm install alert

Manual

Available Sounds

  • bottle (default)
  • glass
  • funk
  • morse
  • purr
  • tink
  • submarine

Adding Custom Sounds

alert.content['foo'] = 'http://bar.com/foo.mp3'
alert('foo')

Accessing Audio API

alert.player.src()
// => foobar.mp3

alert.player.on('ended', function(){})

More info is at azer/play-audio

npm loves you