/** * Widevine CDM hint-file seeding for persistent contexts. * Mirrors Python cloakbrowser/widevine.py. * * CloakBrowser's binary supports Widevine but ships no CDM (proprietary, can't * redistribute). Users sideload it by copying a `WidevineCdm/` directory from a * real Chrome install next to the binary (see issue #96). Chromium reads a * "hint file" from the user-data-dir at early startup to register the CDM, but * on a fresh profile it doesn't exist yet, and Playwright disables the component * updater that would write it. This seeds the hint file before launch so a * sideloaded CDM works on the first run. It never bundles, downloads, or copies * the CDM — only writes the hint when a user-provided CDM is already present. * * Linux only: Chromium's hint-file mechanism is Linux/ChromeOS-specific. */ /** * Locate a sideloaded Widevine CDM directory, or null if absent. * * Resolution order: * 1. If CLOAKBROWSER_WIDEVINE_CDM is set, it is used exclusively (overrides * auto-detection). An invalid value (no `manifest.json`) skips seeding. * 2. `/WidevineCdm` — a manual sideload, per version. * 3. `/WidevineCdm` (`~/.cloakbrowser/WidevineCdm`) — the * version-independent location the Docker auto-fetch and fetch-widevine.py * write to. This fallback lets one fetched CDM serve any binary (free or * Pro, any version) with no env var — the CDM `.so` is arch- not version-specific. * * A directory counts only if it contains `manifest.json`. The returned path is * absolute and symlink-resolved (mirrors Python's Path.resolve()). * @internal Exported for testing. */ export declare function resolveWidevineCdmDir(binaryPath: string): string | null; /** * Write the Widevine CDM hint file into a persistent profile before launch. * `binaryPath` is the resolved chrome executable; the CDM is looked for next to * it. No-op on non-Linux, when disabled via CLOAKBROWSER_WIDEVINE, or when no * sideloaded CDM is present. Never throws — a failure must not break launch. */ export declare function seedWidevineHint(userDataDir: string, binaryPath: string): void; //# sourceMappingURL=widevine.d.ts.map