HowlSound

HowlSound

This class represents a sound object and controls its playback.

Constructor

new HowlSound(manifest, keysopt, mutedopt)

Source:
Parameters:
Name Type Attributes Default Description
manifest Object
keys Array.<string> <optional>
null
muted boolean <optional>
false

Members

(protected) activeInstanceId_ :number|null

Source:
Type:
  • number | null

(protected) activeSoundKey_ :string

Source:
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

Source:
Type:
  • boolean

(protected) isLooping_ :boolean

Source:
Type:
  • boolean

(protected) manifest_ :Object

Source:
Type:
  • Object

muted

Description:
  • Setter

Source:

Setter

muted

Description:
  • Getter

Source:

Getter

(protected) muted_ :boolean

Source:
Type:
  • boolean

paused

Description:
  • Getter

Source:

Getter

(protected) paused_ :boolean

Source:
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

Source:
Type:
  • function

(protected) soundKeys_ :Array.<string>

Source:
Type:
  • Array.<string>

(protected) sound_ :Howl

Description:
Source:

Howl instance https://howlerjs.com/

Type:
  • Howl

Methods

(protected) changeMute_(value)

Source:
Parameters:
Name Type Description
value boolean

changeVolume(volume)

Source:
Parameters:
Name Type Description
volume number

fade(key, from, to, duration, loopopt, preventStopopt) → {Promise}

Source:
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}

Source:
Returns:
Type
number | null

getActiveSoundKey() → {string|null}

Source:
Returns:
Type
string | null

(protected) handleSoundComplete_()

Source:

hasKey(key) → {boolean}

Source:
Parameters:
Name Type Description
key string
Returns:
Type
boolean

isPlaying(key) → {boolean}

Source:
Parameters:
Name Type Description
key string
Returns:
Type
boolean

load() → {Promise}

Description:
  • Load the sound file

Source:
Returns:
Type
Promise

pause(enable)

Source:
Parameters:
Name Type Description
enable boolean

play(key, volumeopt, loopopt) → {Promise}

Source:
Parameters:
Name Type Attributes Default Description
key string
volume number <optional>
1
loop boolean <optional>
false
Returns:
Type
Promise