I also failed to get readstate on ipad, but you can get other events that more or less allow you to output readistate.
var audio = new Audio("someSource.mp3"); audio.play(); audio.addEventListener("canplay", handleCanPlay, false); audio.addEventListener("durationchange", handleDurationChange, false);
But let's be clear, the problem is that Apple says a lot to the whole damn world that they are misusing the Internet. Of course, everyone hates sites that start playing music when they load, but then Apple goes blank and kills ANY / ALL audio / video buffering, which is clearly not triggered by the user's gesture, because Apple seems to think that their users are too lag behind click back if the site bothers them; fans agree too. It basically leaves the rest of us to rip shit out of our apps if we dare to try and control any sound effects. I know this is not a place for ranting ... but Iβll be damned if you build ANY soft interesting / interactive experience in HTML5 on iPad, itβs not one facepalm after another ... whether itβs a 5 MB cache limit, it just leads browser crash if there are too many images on the page (according to Apple) or difficulties with pre-loading any media files to improve the user interface - seriously, outside of blogs and rss-readers for Wordpress, Safari implementation for Safari mobile devices is pretty useless. So, the dream that HTML5 "builds once, plays anywhere", the value proposition is dead, and we are back to developing our own applications ... at least this gives us a good job / rant security / pant
Jason
source share