addSound(key, url, data, webAudio, audioTag)
Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.Loader.
Parameters
Name | Type | Description |
---|---|---|
key | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
url | string | The URL the asset was loaded from. If the asset was not loaded externally set to |
data | object | Extra sound data. |
webAudio | boolean | True if the file is using web audio. |
audioTag | boolean | True if the file is using legacy HTML audio. |
- Source code: loader/Cache.js (Line 338)
Please login to continue.