nativescript-sound
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "nativescript-sound", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Play a sound in your NativeScript app", | ||
@@ -5,0 +5,0 @@ "main": "sound.js", |
@@ -23,4 +23,8 @@ # NativeScript Sound | ||
It's important to preload the audio file into the **sound** module before playing it; there is a delay during creation due to the audio being processed. | ||
```js | ||
var tada = sound.create("~/sounds/tada.mp3"); | ||
var tada = sound.create("~/sounds/tada.mp3"); // preload the audio file | ||
// play the sound (i.e. tap event handler) | ||
tada.play(); | ||
@@ -27,0 +31,0 @@ ``` |
4605
42