jquery.easyaudioeffects.js
Demo
Demo is here.
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.
Usage
###Basic Usage
Include necessary JS files
<script src="jquery.js"></script> //v1.7.0〜 <script src="jquery.easyAudioEffects.js"></script>
Set audio files (Both *.ogg and *.mp3 are required)
$('.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 :
$('.selector').easyAudioEffects({ ogg : "./path/to/sound.ogg", mp3 : "./path/to/sound.mp3", eventType : "hover" // or "click" });
playType :
playType : "oneShotPolyphonic"
$('.selector').easyAudioEffects({ ogg : "./path/to/sound.ogg", mp3 : "./path/to/sound.mp3", eventType : "hover", // or "click" playType : "oneShotPolyphonic" });
playType : "oneShotMonophonic"
$('.selector').easyAudioEffects({ ogg : "./path/to/sound.ogg", mp3 : "./path/to/sound.mp3", eventType : "hover", // or "click" playType : "oneShotMonophonic" });
playType : "gate"
$('.selector').easyAudioEffects({ ogg : "./path/to/sound.ogg", mp3 : "./path/to/sound.mp3", eventType : "hover", // or "click" playType : "gate" });
playType : "loop"
$('.selector').easyAudioEffects({ ogg : "./path/to/sound.ogg", mp3 : "./path/to/sound.mp3", eventType : "hover", // or "click" playType : "loop" });