-
Notifications
You must be signed in to change notification settings - Fork 24
SoundManager2
bendangelo edited this page Feb 22, 2012
·
2 revisions
HTML5 audio codec support across all browsers is inconsistent. Some browsers support mp3 and some ogg. There is currently no codec all major browsers support. This makes developing games difficult because either two codecs version of each sound much be created or a polyfill must be used.
In this case, you can use the polyfill SoundManager2 to enable mp3 playability in all browsers. Now you don't have to create two codec versions of every sound, but it comes at a small cost of a bigger file size.
Assuming you're in the root game directory.
- Download the latest version of soundmanager2.
- Place
soundmanager2-nodebug-jsmin.js
into the/scripts/plugins/
directory. - Now place
soundmanager2.swf
in/assets/
- In your code add
soundManager.url = '/assets';
Thats it.