:sound: A simple tiny Javascript library to add interaction sounds to your website.
:sound: A simple tiny Javascript library to add interaction sounds to your website.
The library creates HTML5 audio element and uses it to play mp3/ogg audio files which is currently supported in all browsers.
Include the minified Javascript right before the `` tag of your page.
...
Add the class “loud-link-hover” to any link/element that you want to give a sound on hover, or add the class “loud-link-click” to any link/element that you want to give a sound on click.
Add the attribute data-sound” to the element with absolute URL of your sound file, substituting {{type}} for where mp3 or ogg would be (e.g. http://example.com/audio/noise.{{type}} ), or just the name of your sound file without the extension if your files are located at the root of your website under sounds/ folder with mp3/ and ogg/ subdirectories.
See the LICENSE file for license rights and limitations (MIT).
No open issues yet, or sync has not completed.