Technically, due to patent issues, there is no single
sound format that is supported by all web browsers. While
mp3 is supported across the
latest versions of major browsers on OS X and Windows, for example,
it may not be available on some less mainstream operating systems and
browsers.
*
To ensure full compatibility, you can include the same sound file
in multiple formats, e.g. 'sound.mp3' and 'sound.ogg'. (Ogg is an
open source alternative to mp3.) You can convert audio files
into web friendly formats for free online at media.io
.
*
The soundFormats() method tells loadSound which formats
we have included with our sketch. Then, loadSound will
attempt to load the first format that is supported by the
client's web browser.