hxaudio.js is a drop-in javascript library that allows HTML5’s <audio>
tag to look the same in any browser.
Native AudioElement Google Chrome
Native AudioElement Firefox
Native AudioElement Safari
It uses native <audio>
. It provides a consistent html player UI to all browsers which can be styled used standard css.
Native AudioElement styled by HxAudio.js
I was inspired by the works of Anthony Kolber: audio.js.
But after a closer look it could use an update:
hxaudio.js
and hxaudio.gif
in the same folder./hxaudiojs
/hxadio.js
/hxaudio.gif
<script src="/hxaudiojs/hxaudio.js"></script>
<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
It has been verified to work across:
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.
Annotated source / Source on Github
hxaudio.js is released under an MIT License, so do with it what you will.
Use NPM watch for automate build
cd
to the correct folder
npm install
npm run watch
or just build it once with
haxe javascript.hxml
And open /bin/index.html
in your favorite browser.