Design, CG Graphics & Inspiration
Listen to the music in any browser with audio.js

Listen to the music in any browser with audio.js

audio.js is a javascript library that lets you use HTML5 tag everywhere. And what does it mean “everywhere”? If you can use the tag, it will use it, otherwise it will connect the player to flash. The library also includes the UI display for this player, which can be modified by using css.

So, first put audio.js, player-graphics.gif and audiojs.swf in the same folder and then Include the audio.js file

Initialise audio.js:

Now you only have to insert the code into the page

A series of API tests & examples for using and extending audio.js

Example 1 – Customised playlist player
Example 2 – Multiple players, testing preload, loop & autoplay attributes

Browser & format support

With Flash as a fallback, it should work pretty much anywhere.
It has been verified to work across:
• Mobile Safari (iOS 3+)
• Android (2.2+, w/Flash)
• Safari (4+)
• Chrome (7+)
• Firefox (3+, w/ Flash)
• Opera (10+, w/ Flash)
• IE (6, 7, 8, w/ Flash)

Audio.js focuses on playing mp3s. It doesn’t currently support the ogg format. As mp3 is the current defacto music transfer format, ogg support is lower on our list of priorities.

SHARE THIS POST

Andrew is the chief editor of Splashnology blog. He has many years of experience within the web design industry and has a passion for the latest web technologies. 3D Models Marketplace

Subscribe for the hottest posts

Subscribe to our email newsletter for useful tips and freebies.

  • peter frantzen

    Hello,
    This is a really cool js-File, that I want to use on my website. It works fine with single files, but i could not yet make it work with a playlist. I kind of copied the playlist from the source code of your example, but that did not work. Can you show me the actual code you put in your CMS (I am using Joomla) or html-file to make it work?

    Thanx in advance

    peter

  • peter frantzen

    Hello,
    This is a really cool js-File, that I want to use on my website. It works fine with single files, but i could not yet make it work with a playlist. I kind of copied the playlist from the source code of your example, but that did not work. Can you show me the actual code you put in your CMS (I am using Joomla) or html-file to make it work?

    Thanx in advance

    peter