import type { ChunkManifest } from './types.js'; /** * Generates a Service Worker that handles chunk reassembly for large files * * The generated SW uses YouTube-style streaming with: * - ReadableStream for progressive delivery (zero-memory overhead) * - Cache-first strategy for individual chunks only * - Proper HTTP range request handling * - No caching of assembled responses (chunks only) * * @param manifests - Array of chunk manifests for all chunked files * @param baseUrl - Base URL for content delivery * @returns Complete Service Worker JavaScript code as a string */ export declare function generateChunkReassemblyServiceWorker(manifests: ChunkManifest[], baseUrl: string): string; /** * Generates the HTML script tag to register the Service Worker * * This implementation fixes the race condition where videos/chunked files * would fail to load on first page visit because the browser would request * them before the service worker could intercept the requests. * * Solution: Register SW immediately (not on 'load' event) and dispatch * a custom event when ready. Video elements should wait for this event. * * @param swUrl - URL path to the service worker file * @returns HTML script tag as a string */ export declare function generateServiceWorkerRegistration(swUrl: string): string; //# sourceMappingURL=serviceWorkerGenerator.d.ts.map