Package Exports
- clicktone
- clicktone/dist/index.js
- clicktone/dist/index.module.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clicktone) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
clicktone
A simple class that provides a convenient abstraction for handling
audio playback by web applications, with support for iOS devices.
➤ Install
yarn add clicktone
➤ Import
import ClickTone from 'clicktone';
➤ Usage
Class uses the Web Audio API, which supports many audio file formats: MP3, WAV, OGG, AAC and others. Please note that not all browsers support these formats.
const clickSound = new ClickTone('./sound.mp3');
myButton.addEventListener('click', () => clickSound.play());
➤ License
clicktone is released under MIT license.