Shaku

Shaku JS

Back To Table of Content

Sound Asset

SoundAsset

A loadable sound asset. This is the asset type you use to play sounds.

Kind: global class

soundAsset.valid

Kind: instance property of SoundAsset

soundAsset.load() ⇒ Promise

Load the sound asset from its URL. Note that loading sounds isn’t actually necessary to play sounds, this method merely pre-load the asset (so first time we play the sound would be immediate and not delayed) and validate the data is valid.

Kind: instance method of SoundAsset
Returns: Promise - Promise to resolve when fully loaded.

soundAsset.destroy()

Kind: instance method of SoundAsset