Handling flash blockers

It's good to let users see the flash component of SM2, so those with flash blockers can unblock it and allow SM2 to start. For more info on this, see the Flashblock example.

Preventing auto-init using SM2_DEFER

If you want to completely defer the normal start-up of SM2 and call the SoundManager() constructor yourself, you can declare an SM2_DEFER global and set it to true. See the SM2_DEFER example for details.

Disabling debug output

SoundManager 2 will write to a debug <div> element or a javascript console if available, by default. To disable it, simply set the relevant property to false:

soundManager.setup({ debugMode: false });

To see related configuration code, refer to the source of this page which basically does all of the above "for real."

Troubleshooting

If SM2 is failing to start and throwing errors due to flash security, timeouts or other issues, check out the troubleshooting tool which can help you fix things.

No-debug, compressed version of soundmanager2.js

You can also use the "minified" (60% smaller) version of SM2, which has debug output and comments removed for you: soundmanager2-nodebug-jsmin.js. If you can, serve this with gzip compression for even greater bandwidth savings!