This page is work-in-progress. You can reach me on twitter or mail to


The default path is sounds/ but you can always change it: = new SoundOnDemand(); = "assets/sounds/";

Prefered audio format

Prefered audio format is ogg then mp3

If system doesn't support prefered audio format it will switch to the other one.

You should simply provide both ogg and mp3 version of your sounds.

You can change prefered audio format: = "mp3";

How the paths are resolved

Assuming ogg is format prefered by the browser and path is sounds/:"explosion");        /* sounds/explosion.ogg */"themes/mainmenu");  /* sounds/themes/mainmenu.ogg */

Ask question:

Fork me on GitHub