SoundManager - Sounds for your Stuff
by Nick ~ July 23rd, 2008So putting sound in web pages is annoying. It’s annoying for developers to implement, and it’s annoying for users when crappy developers do a crappy job. The most annoying part of implementing sounds in a web page is getting your sounds to be cross browser compatible. Embedding a sound will cause the browser to load up a default player which may or may not be installed and can cause a user prompt to install it. Once the sound is loaded in the browser’s player of choice, you have no way of knowing what player it is, and of course they all have their own way of manipulating sound. But hey, if you knew flash you could write code to play sounds that is cross browser compatible. Most modern browsers support flash and if some of your users don’t have it, well it is still a better solution than the alternative. Unfortunately for you, you don’t know flash and you obviously aren’t going to learn it just to play some sounds. Well you can thank Scott Schiller for his wonderful project SoundManager. Scott has taken the hard flash part and turned it into an easy javascript api. Of course if you don’t know javascript, this will be a piece of cake and you should learn it anyway. I found this project very useful by combining it with the Adobe Flash Player Detection Kit. By using this to detect your end user’s flash player version (or lack thereof) you can choose to load sounds or not. This can help prevent users without flash from getting an annoying popup asking them to upgrade or install flash. Hopefully this can help some people out there trying to develop sound in their projects. Just make sure you don’t condemn yourself to developer hell by annoying your users and the internet at large by including obnoxious background music and sounds for everything on your site.
For a good example of how you should never include sound in your site check out this abomination. Just because you read HTML for Dummies doesn’t mean you should be creating websites.


