The implementation of an audio tag is highly browser dependent. Its support, I would say, is less than a video tag, as it was in the hype after Steve Jobs talk about Flash against the holy war of HTML5, it is funny enough that it is least supported by Safari. And itβs true that it works well for the Video tag (on the event handler), does not work for the Audio tag, but itβs good that the statuses are still true. For instance:
var a = new Audio();
a.networkState and a.readyState - checking this every second on the timer, you can easily get an idea of ββthe loading and progress of the playback.
Other interesting properties:
seeking - True if UA is currently searchingseekable is a TimeRange object that can be accessed.played - TimeRange that UA was played.paused - True if playback is paused.ended - true if playback is finished.currentTime - Returns / sets the playback position in seconds.duration
Remember to use canPlayType(type) - returns "probably" and "maybe"
Update: consider viewing SoundManager2 - http://www.schillmania.com/projects/soundmanager2/
source share