EasyAudioEffects.js

Easily set up sound effects to HTML elements

Latest Version : v1.0.0
with jQuery - v1.7.0 or Later.

About

easyAudioEffects.js easyAudioEffects.js is jquery plug-in. This can be given a very easy sound effects for any of the elements on your WEB site.

compatible browser

This plug-in is the reaction slightly in Safari is slow. (Jun , 2015)

Usage

Basic Usage

                //v1.7.0〜
               
            

jQuery v1.7.0 or later.

               $('.selector').easyAudioEffects({
                  ogg : "/path/to/sound.ogg",
                  mp3 : "/path/to/sound.mp3"
               });
            

Available Options

Parameter Type Default value Description
ogg string none Specify the file path Required
mp3 string none Specify the file path Required
eventType string "hover" Could be "hover" or "click"
playType string "oneShotPolyphonic" Could be "oneShotPolyphonic" , "oneShotMonophonic" , "gate" or "loop"

Examples

eventType :

HOVER!

CLICK!

               $('.selector').easyAudioEffects({
                  ogg : "./path/to/sound.ogg",
                  mp3 : "./path/to/sound.mp3",
                  eventType : "hover" // or "click"
               });
            

playType :

playType : "oneShotPolyphonic"

TRACE!

BARRAGE!

                  $('.selector').easyAudioEffects({
                     ogg : "./path/to/sound.ogg",
                     mp3 : "./path/to/sound.mp3",
                     eventType : "hover", // or "click"
                     playType : "oneShotPolyphonic"
                  });
               

playType : "oneShotMonophonic"

TRACE!

BARRAGE!

                  $('.selector').easyAudioEffects({
                     ogg : "./path/to/sound.ogg",
                     mp3 : "./path/to/sound.mp3",
                     eventType : "hover", // or "click"
                     playType : "oneShotMonophonic"
                  });
               

playType : "gate"

HOVER!

CLICK!

                  $('.selector').easyAudioEffects({
                     ogg : "./path/to/sound.ogg",
                     mp3 : "./path/to/sound.mp3",
                     eventType : "hover", // or "click"
                     playType : "gate"
                  });
               

playType : "loop"

HOVER!

CLICK!

                  $('.selector').easyAudioEffects({
                     ogg : "./path/to/sound.ogg",
                     mp3 : "./path/to/sound.mp3",
                     eventType : "hover", // or "click"
                     playType : "loop"
                  });