import { PropsWithChildren, type ComponentRef, type ForwardRefExoticComponent, type RefAttributes } from 'react'; import { StyledProps, StyledProp } from '@mapples/style'; import type { VideoContentFit } from 'expo-video'; import { View, ViewProps, ViewStyle } from 'react-native'; /** * Props for the Video component. * * @public */ export type VideoProps = PropsWithChildren & { /** URI of the video to play */ source?: string; /** Whether playback should start automatically once the source is ready */ autoPlay?: boolean; /** Whether the video should loop when it reaches the end */ loop?: boolean; /** Whether native playback controls (play/pause, seek bar) are shown */ controls?: boolean; /** How the video should be scaled within its bounds (e.g. `"contain"`, `"cover"`) */ contentFit?: VideoContentFit; /** Styling configuration for the video container and the underlying video view */ styled?: StyledProps & { /** Styling applied directly to the `VideoView` element */ styleVideo?: StyledProp; }; }; /** * A customizable video player component with built-in styling support. * * The Video component wraps Expo's `VideoView` and `useVideoPlayer` hook, * exposing common playback options (`autoPlay`, `loop`, `controls`) as props. * Container and video-specific styling are handled through the `@mapples/style` * system via the `styled` prop. * * @example * ```tsx *