Audio player module using the Web Audio API.
$ npm install intempo --saveAlternatively, you can use jspm:
$ jspm install npm:intempoimportintempofrom'./path/to/intempo';intempo.loadPlayer({// returns a promise of the player instancearraybuffer: mybuffer,// Must be an instance of ArrayBufferaudioContext: newAudioContext(),// optional, will be created if not specifiedstateChangedCallback: state=>console.log(state),// optional, see section "Properties"positionChangedCallback: position=>console.log(position),// optional, see section "Properties"clockInterval: 25// optional, default: 20}).then(player=>{// now we have the player instanceplayer.start();// start at the current positionplayer.pause();// pause at the current positionplayer.start(3000);// start at the 3rd second into the fileplayer.stop();// stop and rewind to the beginning of the file}).catch(error=>{// the player could not be loaded...console.error(error);});player.duration// gets the duration of the file in milliseconds (readonly)player.state// gets the current state of the player (readonly), can be one of these:// intempo.STATE_STOPPED,// intempo.STATE_PLAYING,// intempo.STATE_PAUSINGplayer.position// gets or sets the current position in millisecondsStart a webserver in the root directory and browse to examples.html.
v1.1.0 (2015-12-20) Compile and publish to NPM
v1.0.2 (2015-03-22) Add JSPM support
v1.0.1 (2015-02-22) Better bower ignores and logo in nice resolution
v1.0.0 (2015-02-22) Initial working solution
Licensed under MIT.
