Created
October 22, 2017 22:20
-
-
Save beefchimi/d0d0fccb20b114c5bf67c3add539d0b4 to your computer and use it in GitHub Desktop.
Example of using Loop.js in the Accessible section
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoundFx from '../../SoundFx'; | |
export default function AccessibleFeature() { | |
const target = document.getElementById('AccessibleFeature'); | |
target.addEventListener('mouseenter', () => { | |
SoundFx.Accessible.play(); | |
}); | |
target.addEventListener('mouseleave', () => { | |
SoundFx.Accessible.pause(); | |
}); | |
target.addEventListener('mousedown', () => { | |
SoundFx.Accessible.unmute(1); | |
}); | |
target.addEventListener('mouseup', () => { | |
SoundFx.Accessible.mute(1); | |
}); | |
return target; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment