/** * dash.js HEVC Plugin — Enables HEVC playback in dash.js via WASM transcoding. * * Patches MSE and registers a capabilities filter so dash.js accepts HEVC * representations and transparently transcodes them to H.264. * * Usage: * ```ts * import dashjs from 'dashjs'; * import { attachHevcSupport } from 'hevc.js/dash'; * * const player = dashjs.MediaPlayer().create(); * const cleanup = await attachHevcSupport(player, { wasmUrl: '/hevc-decode.js' }); * player.initialize(videoElement, mpdUrl, true); * ``` */ import type { MSEInterceptConfig } from "@hevcjs/core"; import type { DashComputeAwareOptions } from "./compute-aware.js"; export interface HevcDashPluginConfig extends MSEInterceptConfig { /** * Force HEVC transcoding even if the browser supports HEVC natively. * Useful for testing. Default: false. */ forceTranscode?: boolean; /** * Compute-aware ABR feedback loop. Caps dash.js variants by observed * transcode `speedX` so the device doesn't pick a variant it can't * transcode in real time. * * - **On by default** (undefined or `true`) — sensible defaults. * - Pass an object to tune the decider knobs (`targetSpeedX`, etc.). * - Pass `false` to opt out. */ adaptiveCompute?: boolean | DashComputeAwareOptions; } type DashMediaPlayer = any; /** * Attach HEVC transcoding support to a dash.js MediaPlayer instance. * * Must be called BEFORE player.initialize(). * Skips if the browser has native HEVC support (unless forceTranscode is set). * Checks H.264 encoding support before installing the MSE intercept. * * @param player dash.js MediaPlayer instance * @param config Optional transcoder configuration * @returns A cleanup function to remove the plugin */ export declare function attachHevcSupport(player: DashMediaPlayer, config?: HevcDashPluginConfig): Promise<() => void>; export {}; //# sourceMappingURL=plugin.d.ts.map