UNPKG

ez-web-audio

Version:

Making the Web Audio API super EZ since 2024.

24 lines 882 B
/** * Preload cache for audio URLs. * Shared with src/index.ts load() function for automatic cache hits. */ export declare const responseCache: Map<string, Response>; /** * Preload audio URLs into cache for faster Sound/Track creation. * @param urls - Single URL or array of URLs to preload * @returns Promise that resolves when all URLs are cached * @throws Error if any URL fails to load (after attempting all) */ export declare function preload(urls: string | string[]): Promise<void>; /** * Check if a URL is already preloaded. * @param url - URL to check * @returns true if URL is in cache */ export declare function isPreloaded(url: string): boolean; /** * Clear preload cache. * @param url - Optional specific URL to clear. If omitted, clears entire cache. */ export declare function clearPreloadCache(url?: string): void; //# sourceMappingURL=preload.d.ts.map