audio.load

load(sound: Asset, onloadcb: Function, onerrorcb: Function, settings: Object) → {number}

Load an audio file

Parameters:
Name Type Attributes Description
sound 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)

Returns:
Type Description
number

the amount of asset loaded (always 1 if successfull)

Powered by webdoc!