Put audio.js
, player-graphics.gif
& audiojs.swf
in the same folder.
Include audio.js:
<script src="/audiojs/audio.js"></script>
Initialise audio.js:
<script>
audiojs.events.ready(function() {
var as = audiojs.createAll();
});
</script>
Then you can use <audio>
wherever you like in your HTML:
<audio src="/mp3/juicy.mp3" preload="auto" />
A series of API tests & examples for using and extending audio.js
Example 1 Test multiple load types
Example 2 Custom markup/css
Example 3 Multiple players, testing preload
, loop
& autoplay
attributes
Example 4 Customised player
Example 5 Customised playlist player
Example 5 Volume Control
All efforts have been made to keep the source as clean and readable as possible. Until we release more detailed documentation, the annotated source is the best reference for usage.