export type VideoProbe = { /** `false` when the browser could not read the media at all (decode error / timeout before metadata) — every other field is then meaningless. */ readable: boolean; /** `0` for a readable file with no video track (e.g. an audio-only container). */ width: number; height: number; /** Exact, unrounded seconds, or `null` when the container reports no usable duration (`Infinity` for MediaRecorder WebM, `NaN` for broken metadata). */ durationSec: number | null; /** First readable frame as a JPEG blob. `null` when `cover` was not requested, or the browser could not decode / export one. */ cover: Blob | null; }; export type VideoProbeOptions = { /** Grab the first frame as a JPEG. Off means metadata-only — no full buffering, no decode, no canvas encode. @default true */ cover?: boolean; /** @default 10000 */ timeoutMs?: number; }; /** * Read dimensions, duration and (optionally) a first-frame cover out of a local media URL — an * object URL from `UploadingFile.previewUrl` or `URL.createObjectURL`. Always resolves: media the * browser cannot decode comes back as `readable: false` with zeroed metrics, and a readable file * whose cover cannot be exported comes back `readable: true` with `cover: null`. * * The single media-probing primitive in the kit — every `FileRules` audio / video rule reads through * it with `cover: false`. Audio-only containers are read by the same `