import { MediaErrorKind } from "supervision-js-core"; /** * The vocabulary a media producer may name its own failure in. A producer that * states its cause as one of these on `code` is classified by that name; any * other code is classified from the message like an uncoded failure. */ export declare const MEDIA_PRODUCER_ERROR_CODES: readonly ["ABORTED", "BACKEND_CRASHED", "CONTAINER_UNREADABLE", "DECODER_STALLED", "DECODE_UNSUPPORTED", "NO_VIDEO_TRACK", "PRESENTATION_MISMATCH", "RATE_UNSUPPORTED", "SOURCE_UNREADABLE", "VIDEO_TRACK_UNREADABLE"]; /** * A media failure with a stable, documented kind. * * Branch on `kind` instead of matching decoder, demuxer, or container message * text. `message` stays diagnostic and may name vendor internals; applications * own their user-facing copy. The originating failure is preserved on `cause`. */ export declare class MediaSourceError extends Error { readonly kind: MediaErrorKind; constructor(kind: MediaErrorKind, message: string, options?: { readonly cause?: unknown; }); } export declare function isMediaSourceError(value: unknown): value is MediaSourceError; /** * Classifies an arbitrary media failure into a `MediaSourceError`. * * Already-classified errors pass through so a kind chosen at the point of * failure is never downgraded by a broader message match. Anything the * heuristics cannot place stays representable as `Unknown` rather than being * forced into a wrong kind. */ export declare function toMediaSourceError(error: unknown, fallbackMessage?: string): MediaSourceError; /** * Failure kind of any caught media failure. * * A `MediaSourceError` reports the kind chosen where it failed. Anything else * is classified from its message, and stays `Unknown` when no kind fits. */ export declare function getMediaErrorKind(error: unknown): MediaErrorKind; //# sourceMappingURL=media-errors.d.ts.map