Skip to content
V2.97a.20101221 - HTML5 loading/progress and RTMP tweaks, onready() double-firing fix, hasPriority for mobile flash, Muxtape-style player now AJAX-friendly

Improved HTML5 whileloading() / whileplaying(), unload and event handling. hasPriority for off-screen SWF loading on mobile, replaces old mobileFlash positioning tricks. Effectively re-wrote page player (Muxtape-style) demo to use event delegation + read live DOM, so should not break in AJAX cases. RTMP onplay() / play() / buffering fixes, setPosition() regression fix.

Side reading: "Probably, Maybe, No": The State of HTML5 Audio, an article written for 24ways.org touching on some of the current issues and future promise of audio in HTML.

    Bug fixes
        Double onready()-firing bug (HTML5 and non-flashblock case) fixed.
        HTML5: Don't request null/about:blank URL with unload(), may hang/JS error in Chrome and IE 9 preview 7.
        RTMP: Ensure onplay() is called for auto-loading streams when resumed. Don't call play() until connected. play() sets flash pauseOnBufferFull = false (fix for reported "RTMP not playing audio" issue.)
        overHTTP was likely returning incorrect values previously - now fixed.
        unload() tweak: Ensure position is reset to 0 if unload() fails
        Flash audio: Log metaDataHandler info if debug enabled, possible duration metaData fix
        No HTML5 audio for any Safari on OS X Snow Leopard 10.6.[3|4|5] due to underlying bugs causing intermittent audio playback failure; ongoing Apple issue, on their radar. Amusingly, Safari on Windows appears to be fine.

    API Updates
        Revised HTML5 Audio() events, improved whileloading() / whileplaying() / onload() for Webkit and Firefox 4. Progress/onload are still a bit quirky as HTML5 audio is more about "non-linear" loading including range and partial requests, where supported. See related discussion.
        New soundManager.ok() method, nicer alias for soundManager.supported().
        Took soundmanager.loadFromXML() (SM1 legacy method) out back and shot it. Last tweak was in 2008, nobody uses it.

    Miscellaneous
        Flash <object> / <embed>: hasPriority attribute, enables off-screen SWF loading with Flash 10.1+. Removed mobileFlash positioning/repositioning tricks in lieu of this.
        Effectively re-wrote page-player (Muxtape-style) demo, now traverses live DOM for next item(s). Should be more AJAX-friendly. Event delegation now handles any links added at any time. Externalised experimental features, too.
        HTML5: If URL lacks type attribute and extension such as .mp3 (worst-case scenario, you shouldn't be doing this anyway) just try dumbly loading it - imitating Flash behaviour.
        Improved dataerror (wave/spectrum) exception handling, should result in lowered CPU use if playback continues with access exceptions (eg. YouTube video going in another tab.)
        Start-up debug output/messaging clean-up (no movieStar in flash 8, minimal output in HTML5-only mode, etc.)
        Add window unload handler if Flash being used, so back button will cause a page refresh (vs. the browser showing "previous state") to reinstate Flash in good browsers. Previously, the "previous state" was be shown but Flash audio would be broken.
        ipod (ipod touch) gets HTML5 now, too.
        Microsoft have added Audio() to Internet Explorer 9 as of "Platform Preview 7" - previous pre-releases of IE 9 only implemented <audio>, which SM2 does not use.