AudioJS is a agnostic and cross-browser library to work easily with the AudioContext API of HTML5.
AudioJS is compatible with the following browsers/version:
- Google Chrome 28.0+
- Firefox 25.0+
- Safari 6.0+
- IOS Safari 6.0-6.1+
- Opera 16.0+
- file
String(undefinedby default) - autoPlay
Boolean(falseby default) - loop
Boolean(falseby default) - volume
Number(Range 0-1,1by default)
- audioJS.
play() - audioJS.
stop()
Examples
var audio = window.audioJS({
file: 'audio.mp3'
});
audio.play();
window.setTimeout(function(){
audio.stop();
}, 4000);