clicktone 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -33,15 +33,17 @@ import ClickTone from 'clicktone';
33
33
 
34
34
  <sub>ClickTone uses the Web Audio API, which supports many audio file formats: MP3, WAV, OGG, AAC and others. Note that not all browsers support these formats.</sub>
35
35
  ```javascript
36
- const click = new ClickTone({
36
+ const sound = new ClickTone({
37
37
  file: './sound.mp3',
38
38
  volume: 0.7,
39
- throttle: 400,
39
+ throttle: 100,
40
40
  callback: () => { console.log('Playback ended') },
41
41
  debug: true,
42
42
  });
43
43
 
44
- myButton.addEventListener('click', () => click.play());
44
+ const play = () => sound.play();
45
+
46
+ button.addEventListener('pointerdown', play);
45
47
  ```
46
48
  <br>
47
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clicktone",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "ClickTone is designed to control audio playback with various settings, including volume control, callback and debug mode. It also includes iOS support.",
5
5
  "author": "ux-ui.pro",
6
6
  "license": "MIT",