Skip to content
V2.97a.20110101 - Simplified onready() behaviour (see potential onready() regression note), new ontimeout() handler, Webkit + MovieStar 30-second-pause fix

onready() is now called only for SM2 init success (makes default case easier, no need for "supported" check) - new ontimeout() is called only for failure case, ie., flash blocked/missing. Special Webkit/MovieStar won't-resume-after-30-seconds-paused fix. soundManager.supported() renamed to soundManager.ok() (old method aliased for the time being.)

    Bug fixes

        Special bad case, Webkit/Flash+MovieStar (AAC/MPEG4/RTMP-only, not MP3): sounds don't resume after being paused for 30+ seconds(?), but setPosition() with current position gets things going again after a resume() attempt. Reported via 8tracks dudes.

    API Updates

        In previous releases, the soundManager.onready() queue would be processed for both OK and failure cases. The onready() queue is now processed only if successful initialisation occurs, making old "supported" checks within the onready() handlers redundant.

        Potential regression note: Old error case handling within onready() will never execute as a result of this change. Update your code to use the new explicit soundManager.ontimeout() handler instead.

        Old onready() method

        soundManager.onready(function(){
          if (soundManager.supported()) {
            // OK, play sound etc.
          } else {
            // SM2 could not start; message user?
          }
        });

        New onready() / ontimeout() method

        soundManager.onready(function(){
          // OK, play sound etc.
        });

        soundManager.ontimeout(function(){
          // SM2 could not start; message user?
        });

        New soundManager.ontimeout(myFunction) method, for asynchronous queueing of init failure handlers. Fired only when SoundManager 2 is unable to initialise (usually due to blocked/missing flash, or flash security error.) Queue behaviour is the same style as onready().

    Miscellaneous

        Code cleanup: Took the unsupported "jsAMP" demo (2007 prototype) out back and shot it.
        360° UI demo: New "allowMultiple" config option, let 2+ sounds play at once etc. (Default: false, one at a time.)
        360° UI, canvas visualization demo: Minor layout, UI, code tweaks
        API/docs/demos reference and use updated onready()/ontimeout() methods.