audio.load
load(sound: loader.Asset, onloadcb: Function, onerrorcb: Function, settings: Object) → {number}
Load an audio file
Name | Type | Attributes | Description |
---|---|---|---|
sound | loader.Asset | ||
onloadcb | Function |
<optional> |
function to be called when the resource is loaded |
onerrorcb | Function |
<optional> |
function to be called in case of error |
settings | Object |
<optional> |
custom settings to apply to the request (@link https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) |
Type | Description |
---|---|
number |
the amount of asset loaded (always 1 if successfull) |