-
Notifications
You must be signed in to change notification settings - Fork 23
SoundManager2
bendangelo edited this page Feb 22, 2012
·
2 revisions
HTML5 audio codec support across all browsers is all over the map. Some browsers support mp3 and some ogg. 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 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.jsinto the/scripts/plugins/directory. - Now place
soundmanager2.swfin/assets/ - In your code add
soundManager.url = '/assets';
Thats it.