play() with position: parameter now causes preload-and-play() under HTML5 and flash. For HTML5, onload() is "canplay" event, few bytes actually loaded. Seek cannot happen until canplay has fired. For flash, auto-play is disabled when position or from (as in from/to) are present. iOS may have some bugs when trying
to immediately set currentTime on an HTML5 object when canplay fires.
DOMContentLoaded/readyState=='interactive' fix

fallback when DOMContentLoaded has happened, but document.readyState is
still 'interactive'
Merge pull request #43 from fuzz-radio/load-fix

DOMContentLoaded/readyState == 'interactive' fix (deferred SM2 init from within jQuery $() callback.)
HTML5: Listen to durationchange event, catch-all for duration update events. May help on mobile if duration is determined late. https://getsatisfaction.com/schillmania/topics/soundmanager2_playing_songs_from_a_different_start_point_on_mobile_not_working#reply_13672624
Debug output when durationchange fires, as appropriate.
CommonJS + AMD (requireJS) module.exports / define()
Check window && window.document, barf if loaded in server-side node environment vs. in a browser.
Typo fix, language clarification
Explicitly provide buffering status to onbufferchange(). Don't set buffering(0) when loading, since playback may still be paused.
Fix Flash edge case: play({ url: xxx, position: 0 }) on existing sound with assigned URL. New URL wouldn't take effect.
ImageOptim byte savings
Line-ending
SMSound onwarning and onfailure options for NetStream / RTMP error/exception handling. Removed additional sound param on onfailure() callback, apologies if this breaks anyone's implementation (disclaimer: these options are still experimental, undocumented. :D) "Unhandled" exceptions are now considered non-fatal, using onwarning instead of presuming playback has failed etc.
Don't require flash, use higher-framerate polling rate for HTML5
V2.97a.20140630
Valid HTML
V2.97a.20140630
V2.97a.20140630
Latest roll-up
Generated docs