V2.97a.20110706 - improved HTML5/flash "mixed mode" via preferFlash, Safari + Snow Leopard HTML5 audio bug update, better ClickToFlash compatibility, minor demo tweaks Special note: This was V2.97a.20110705, but the latest Flex SDK (4.5.1.21328) was downloaded and used for this build, and it compiled a Flash 9 SWF that wouldn't fully-start on some Windows machines running Firefox and IE 7, possibly others - thus, SM2 would fail to start up. The Flash 9 SWFs are now compiled with an older, working SDK version 4.1.0.16076, used in previous working releases. See discussion for more details. Improved "mixed mode" HTML5/flash handling via new (experimental) preferFlash option, enabled by default. (If present, MP3/MP4 get flash for stability; HTML5 is used for other formats.) OS X 10.6.8 (finally?) fixes HTML5 audio in Safari. SoundManager 2 SWF adjusted to fall under ClickToFlash's "invisible" rules, may lower chance of blocking. Bug fixes ClickToFlash (Safari/Mac flashblock-style extension) compatibility improvement: Use width/height: auto on SWF instead of 100%. The latter is not recognized as being within ClickToFlash's <= 8x8px "invisible flash" rules, almost guaranteed to be blocked. (When considered "invisible", SWF is allowed to load normally if user has the invisibles option enabled.) Flash blocking/handling improvements: Default #sm2-container size now always 8x8px to fall under "invisible" flash rules, better chance of load being allowed. If blocked and using flashblock.css, #sm2-container reverts to 48x48px at ontimeout() for visibility (so user can see, and unblock the flash bit.) OS X 10.6.8 "pre-Lion release" update finally appears to have fixed the broken Safari HTML5 audio issue. Thus, audio was broken from OS X 10.6.3 to 10.6.7 and SM2 will use Flash for these known cases. Related: Testcase and Webkit bug #32159. HTML5 audio: Playback now does not start after a setPosition() call (if the sound was not already playing), or if it was paused - matching the existing Flash API behaviour. Fix ontimeout() queue incorrectly processing after onload() and successful startup. Debug output: extraneous "%s" fixes for onready() / ontimeout() API Updates Added experimental soundManager.preferFlash (default:true) for a more consistent MP3/MP4 playback option in certain HTML5 cases. If using soundManager.useHTML5Audio + preferFlash and flash is available, flash will be used for MP3/MP4. HTML5 is still new and relatively unstable, and bugs are yet to be found and fixed across a growing number of browsers/platforms etc. (consider that it was broken on Safari between OS X 10.6.3 and 10.6.7.) If flash is not installed or preferFlash = false, 100% HTML5 mode can still apply. In any event, HTML5 will still be used (if enabled) for all other formats. Moved internal html5Only to (experimental) soundManager.html5Only, for detecting "HTML5-only mode" - eg., iOS, Safari without preferFlash or other environments where SM2 is operating without the flash portion of SM2. Miscellaneous Improved "can play" detection (canPlayURL() + canPlayMIME()) for HTML5 + flash cases. Increased "getting impatient, waiting for flash" message to 1 second. 360°, inline, MP3 button players: Event add/remove: use addEventListener based on typeof attachEvent === null (old IE behaviour) MP3 player button demo: Fix IE 6/7 display issue on button (d'oh!) Muxtape-style demo: Added pagePlayer.playPrevious(), to match pagePlayer.playNext() (call when a sound is currently playing.) Fixed 360° player basic visualization demo (missing class in HTML), clarified canvas support (no eq/spectrum) re: IE <9. 360° UI: Old "empty element doesn't catch mouse events" bug apparently still applies to IE 9. Fix with invisible background image. Minor homepage stylistic updates, source code order change for API docs (CTRL-F search now hits left column first) Small debug output clean-up in SM2, object/embed, init etc.