import { type ComponentType } from "react"; import { type ImageSourcePropType } from "react-native"; import { type LayoutStyle } from "../../style/index.js"; import { Emblem as WebEmblem } from "../emblem/emblem.js"; import { Icon as WebIcon } from "../icon/icon.js"; import { type ImageRadius } from "../image/image.shared.js"; import { Spinner as WebSpinner } from "../spinner/spinner.js"; import { type VideoTransport } from "./video.controls.js"; import { type VideoSkin } from "./video.styles.js"; /** A clip: a remote `{ uri }`, or a bundled asset from `require(...)`. */ export type VideoSource = { uri: string; } | number; /** Corner radius steps: the kit's radius scale, as on Image. */ export type VideoRadius = ImageRadius; export interface VideoProps { /** The clip: a remote `{ uri }`, or a bundled asset from `require(...)`. */ source: VideoSource; /** A still shown until the clip's first frame is on screen: a remote `{ uri }` or a bundled asset. */ poster?: ImageSourcePropType; /** Fit: show the whole picture, letterboxed on black. The default (pick one). */ contain?: boolean; /** Fit: fill the frame, cropping the overflow (pick one). */ cover?: boolean; /** Fit: fill the frame by distorting the aspect ratio (pick one). */ stretch?: boolean; /** * Start playing as soon as the clip is ready, unless the system asks to reduce * motion. Browsers autoplay only muted clips, so pair it with `muted` on the web. */ autoplay?: boolean; /** Play again from the start at the end. */ loop?: boolean; /** Play without sound. */ muted?: boolean; /** * Transport controls: the platform's own player controls * * on iOS and Android, * * * in a native app, * * the kit's control bar on the web. */ controls?: boolean; /** Width over height of the clip; the frame fills its parent's width at this ratio (default 16 / 9). */ aspectRatio?: number; /** Corner radius from the kit's radius scale (pick one): none, sm, md, lg, xl, 2xl, 3xl, full. */ radius?: VideoRadius; /** The clip's accessible name, used in the names of its controls (default "video"). */ accessibilityLabel?: string; /** Called when playback starts or stops. */ onPlayingChange?: (playing: boolean) => void; /** Called when the clip plays to its end (each time round, when looping). */ onEnd?: () => void; /** E2E hook forwarded to the frame. */ testID?: string; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } /** Build a Video component from a platform skin and its platform parts. */ export interface VideoParts { /** `controls` hands the frame to the platform's own player controls (iOS, Android). */ nativeControls?: boolean; /** The kit's control bar, drawn when `controls` is on and the platform has none of its own. */ Controls?: ComponentType; Emblem?: typeof WebEmblem; Icon?: typeof WebIcon; Spinner?: typeof WebSpinner; /** The platform's Button and Slider for the kit's bar (the web builds by default). */ Button?: VideoTransport["Button"]; Slider?: VideoTransport["Slider"]; } type Fit = "contain" | "cover" | "fill"; export declare function fitOf(p: VideoProps): Fit; export declare function createVideo(skin: VideoSkin, parts?: VideoParts): (props: VideoProps) => import("react").JSX.Element; export {}; //# sourceMappingURL=video.shared.d.ts.map