OptionalautoplayBegin playback immediately on load. Defaults to false.
OptionalformatExplicit format hint, for sources whose extension cannot be read from the URL (a blob, or a URL without one).
Optionalhtml5Force the HTML5 <audio> element backend instead of WebAudio
decoding. Defaults to false.
OptionalloopLoop playback when the clip ends. Defaults to false.
OptionalmuteStart muted. Defaults to false.
Logical name used to play / stop / reference the sound later.
OptionalonLifecycle callbacks for this clip. Each is optional and fires for every instance of the clip.
OptionalpoolHow many finished instances of this clip are kept around for reuse before
being discarded. Defaults to 5.
This does not limit how many instances can play at once — it trades memory against the cost of recreating an instance for a clip that is triggered rapidly.
OptionalpreloadWhether to begin downloading on load. "metadata" fetches only enough to
report duration. Defaults to true.
OptionalrateInitial playback rate, 0.5..4.0. Defaults to 1.0.
OptionalspriteNamed regions within a single file, each [start, duration] in
milliseconds, with an optional third element marking the region as
looping. Lets one download carry many effects.
Base path / prefix for the audio resource. The loader builds the
full URL as ${src}${name}.${ext} for each format configured by
audio.init(), so src is typically a directory ending in /.
Data URLs (data:audio/...) are used as-is and skip the prefix
OptionalstreamStream the resource instead of fully decoding upfront — preferred
for long music tracks. Defaults to false.
Sound asset descriptor passed to
audio.load.