Demo is here.
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.
###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" |
$('.selector').easyAudioEffects({
ogg : "./path/to/sound.ogg",
mp3 : "./path/to/sound.mp3",
eventType : "hover" // or "click"
});
$('.selector').easyAudioEffects({
ogg : "./path/to/sound.ogg",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "oneShotPolyphonic"
});
$('.selector').easyAudioEffects({
ogg : "./path/to/sound.ogg",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "oneShotMonophonic"
});
$('.selector').easyAudioEffects({
ogg : "./path/to/sound.ogg",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "gate"
});
$('.selector').easyAudioEffects({
ogg : "./path/to/sound.ogg",
mp3 : "./path/to/sound.mp3",
eventType : "hover", // or "click"
playType : "loop"
});