# AssetResolver · API · zvuk

zvuk v1.14.1 · MIT · https://zvuk.schmooky.dev/api/AssetResolver/

Hook for adopting buffers from an external asset system (Pixi assetpack,
IndexedDB cache, custom manifest) instead of (or in addition to) zvuk's
URL fetcher. Returning 
`undefined`
/
`null`
 falls through to the URL fetch,
so resolvers can mix cached and uncached sounds without branching at the
call site.

The resolver runs before any fetch. If it returns a buffer or URL, the
URL list passed to 
`loadSound`
 is only used as the resolution key.

[← API](/api/)

TypeAlias

# AssetResolver

Hook for adopting buffers from an external asset system (Pixi assetpack, IndexedDB cache, custom manifest) instead of (or in addition to) zvuk's URL fetcher. Returning \`undefined\` / \`null\` falls through to the URL fetch, so resolvers can mix cached and uncached sounds without branching at the call site. The resolver runs before any fetch. If it returns a buffer or URL, the URL list passed to \`loadSound\` is only used as the resolution key.
