Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clinical-meteor/audio-click
Meteorite package that provides an audible click when a user taps, clicks, or mousedowns on your app.
https://github.com/clinical-meteor/audio-click
Last synced: about 1 month ago
JSON representation
Meteorite package that provides an audible click when a user taps, clicks, or mousedowns on your app.
- Host: GitHub
- URL: https://github.com/clinical-meteor/audio-click
- Owner: clinical-meteor
- Created: 2013-04-13T13:08:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-06T19:32:11.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T16:26:31.049Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: license.mit.txt
Awesome Lists containing this project
README
audio-click
=========================**audio-click** is a Meteorite package for adding audio UI elements to a Meteor application. It's not intended to be a full featured audio package, and is only intended to wire up simple clicks and beeps to buttons and other UI elements. Currently supports adding sound to any javascript event, including clicks, taps, mouseup, mousedown, etc.
=========================
### InstallationFirst, install the audio-click package from the command line, like so:
````
mrt add audio-click
````=========================
### Data/Document ModelSecond, add the audioSoundsTemplate to your application, which adds all the necessary audio objects to the DOM.
````
{{> audioSoundsTemplate }}
````=========================
### ControllersThird, add the following line to any event you want to play a click.
````
document.getElementById('clickAudioClip').play();
````For instance, you might have a reactive template wired up like this:
````js
Template.sampleListItem.events({
'click': function(evt){
document.getElementById('clickAudioClip').play();
// do something fancy when clicked...
}
});
````=========================
#### Linkshttps://forums.meteor.com/t/storing-small-audio-files/18912
https://forums.meteor.com/t/script-doesnt-load-web-audio-buffers-properly-on--id-routes/15270=========================
#### License![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)