Skip to content

Meteorite package that provides an audible click when a user taps, clicks, or mousedowns on your app.

Notifications You must be signed in to change notification settings

clinical-meteor/audio-click

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

=========================

Installation

First, install the audio-click package from the command line, like so:

mrt add audio-click

=========================

Data/Document Model

Second, add the audioSoundsTemplate to your application, which adds all the necessary audio objects to the DOM.

    {{> audioSoundsTemplate }}

=========================

Controllers

Third, 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:

    Template.sampleListItem.events({  
        'click': function(evt){  
            document.getElementById('clickAudioClip').play();  
            // do something fancy when clicked...
        }  
    });  

=========================

Links

https://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

About

Meteorite package that provides an audible click when a user taps, clicks, or mousedowns on your app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published