Properties:
Name | Type | Default | Description |
---|---|---|---|
autoPlay |
boolean | false |
|
complete |
Function |
Global complete callback when play is finished. |
|
loaded |
Function |
Call when finished loading. |
|
loop |
boolean | false |
Initial loop value, |
preload |
boolean |
|
|
singleInstance |
boolean | false |
|
source |
ArrayBuffer | AudioBuffer | HTMLAudioElement |
If sound is already preloaded, available. |
|
speed |
number | 1 |
The playback rate where 1 is 100% speed. |
sprites |
Record<string, SoundSpriteData> |
The map of sprite data. Where a sprite is an object
with a |
|
url |
string | string[] |
The source of the file being loaded |
|
volume |
number | 1 |
The amount of volume 1 = 100%. |
Members
true
to immediately start preloading.
- Default Value:
- false
Global complete callback when play is finished.
Call when finished loading.
Initial loop value, true
is loop infinitely
- Default Value:
- false
true
to immediately start preloading if loading from url
.
true
to disallow playing multiple layered instances at once.
- Default Value:
- false
If sound is already preloaded, available.
The playback rate where 1 is 100% speed.
- Default Value:
- 1
sprites Record<string, SoundSpriteData>
The map of sprite data. Where a sprite is an object
with a start
and end
, which are the times in seconds. Optionally, can include
a speed
amount where 1 is 100% speed.
The source of the file being loaded
The amount of volume 1 = 100%.
- Default Value:
- 1