import "./media_player.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; /** `MediaError` reports a 401, a 404 and an unplayable codec all as code 4 (`SRC_NOT_SUPPORTED`); the HTTP * status separates a lapsed session from a broken file. */ export interface MediaLoadFailure { /** `null` when it could not be determined. */ status: number | null; /** `MediaError.code` — 1 aborted, 2 network, 3 decode, 4 unsupported. */ code: number | null; } export interface MediaPlayerProps extends StyleProps { /** Already served; signing and auth are the host's. */ src: string; /** Not inferred from the MIME type: a screen recording carries both streams, and the caller decides * whether a picture is shown. */ kind: "audio" | "video"; /** The still the video rests on; without one it paints black until metadata, opening as a hole. Ignored * on audio. */ poster?: string; /** Poster and frames alike, or the first press jumps. `contain` (default) letterboxes, since a recording * is evidence and a crop hides some of it; `cover` fills and crops, only where the surface is itself a * crop (a feed card, a grid tile). Ignored on audio. */ fit?: "contain" | "cover"; /** Required: an unlabelled player is a blank control. */ accessibilityLabel: string; /** Called once on a failed load, for the host to report (the kit has no analytics); the player already * shows the failure. Omitted, no status probe runs. */ onError?: (failure: MediaLoadFailure) => void; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** The kit's media scale, for a caller box with no height, so a clip does not resize its row when metadata * arrives. */ export declare const CLIP_RATIO = "16 / 9"; /** Playback for one audio or video source. Transport is the platform's: a hand-rolled bar would re-earn * keyboard, screen-reader, volume, speed, PiP, fullscreen, download and captions. It fills its parent — * the caller composes the box (a modal's height, a chat bubble's 16:9) — and `fit` answers only whether * the picture is kept whole or fills it. */ export declare function MediaPlayer(props: MediaPlayerProps): React.ReactElement>;