Constructor
new HowlSound(manifest, keysopt, mutedopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
manifest |
Object | |||
keys |
Array.<string> |
<optional> |
null
|
|
muted |
boolean |
<optional> |
false
|
Members
(protected) activeInstanceId_ :number|null
Type:
- number | null
(protected) activeSoundKey_ :string
Type:
- string
(protected) completer_ :Completer
- Description:
Completer is a helper which returns a promise. Its solved if the loading of the sound is completed.
- Source:
Completer is a helper which returns a promise. Its solved if the loading of the sound is completed.
Type:
- Completer
duration
- Description:
Getter
- Source:
Getter
howlInstance
- Description:
Getter
- Source:
Getter
(protected) isAudioSprite_ :boolean
Type:
- boolean
(protected) isLooping_ :boolean
Type:
- boolean
(protected) manifest_ :Object
Type:
- Object
muted
- Description:
Setter
- Source:
Setter
muted
- Description:
Getter
- Source:
Getter
(protected) muted_ :boolean
Type:
- boolean
paused
- Description:
Getter
- Source:
Getter
(protected) paused_ :boolean
Type:
- boolean
rate
- Description:
Setter
- Source:
Setter
rate
- Description:
Getter
- Source:
Getter
seek
- Description:
Setter
- Source:
Setter
seek
- Description:
Getter
- Source:
Getter
(protected) soundCompleteFunction_ :function
Type:
- function
(protected) soundKeys_ :Array.<string>
Type:
- Array.<string>
(protected) sound_ :Howl
- Description:
Howl instance https://howlerjs.com/
- Source:
Howl instance https://howlerjs.com/
Type:
- Howl
Methods
(protected) changeMute_(value)
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean |
changeVolume(volume)
Parameters:
Name | Type | Description |
---|---|---|
volume |
number |
fade(key, from, to, duration, loopopt, preventStopopt) → {Promise}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
string | |||
from |
number | |||
to |
number | |||
duration |
number | in milliseconds |
||
loop |
boolean |
<optional> |
false
|
|
preventStop |
boolean |
<optional> |
false
|
Returns:
- Type
- Promise
getActiveInstance() → {number|null}
Returns:
- Type
- number | null
getActiveSoundKey() → {string|null}
Returns:
- Type
- string | null
(protected) handleSoundComplete_()
hasKey(key) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
Returns:
- Type
- boolean
isPlaying(key) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
Returns:
- Type
- boolean
load() → {Promise}
- Description:
Load the sound file
- Source:
Returns:
- Type
- Promise
pause(enable)
Parameters:
Name | Type | Description |
---|---|---|
enable |
boolean |
play(key, volumeopt, loopopt) → {Promise}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
string | |||
volume |
number |
<optional> |
1
|
|
loop |
boolean |
<optional> |
false
|
Returns:
- Type
- Promise