Easy way to manage and play sound effects using HTML5 Web Audio API
Is just that. It's a simple sound effect manager for playing sounds using the awesome HTML 5 Web Audio API.
If you think I'm talking about
<audio> tags, go read this: http://www.html5rocks.com/en/tutorials/webaudio/intro/
It's significantly better than
<audio> tags for several reasons:
npm install sound-effect-manager
// just init the sound effect managervar SoundEffectManager = require'sound-effect-manager';var sm = ;// load some files by passing it a url and a namesmloadFile'taps.mp3' 'taps';smloadFile'rocket.wav' 'rocket';// then play the sounds like so:smplay'rocket';// or play a sound in looping mode:smplay'taps' true;// and to stop a loop:smstop'taps';// that's it!