import React$1, { Context } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; declare const useControls: () => { play: () => Promise; pause: () => void; togglePlay: () => Promise; forward: () => void; rewind: () => void; updateVolume: (volume: number) => void; updatePlaybackRate: (rate: number) => void; increasePlaybackRate: () => void; decreasePlaybackRate: () => void; toggleMute: () => void; increaseVolume: () => void; decreaseVolume: () => void; toggleFullscreen: () => void; togglePip: () => Promise; seek: (time: number) => void; setLoop: (loop: boolean) => void; }; interface VideoProps { /** * Indicates whether the video should have controls. If `false`, wont render the controls */ controls?: boolean; /** * The source of the video * @example "https://www.example.com/video.mp4" * @example "/video.mp4" **/ src: string | MediaStream | null; height: string | number; width: string | number; poster?: string; /** * Indicates whether the video should show a preview when seeking */ seekPreview?: boolean; /** * Event Listener for when the video time updates * @param time - The current time of the video */ onTimeUpdate?: (time: number) => void; /** * Event Listener for when the video plays */ onPlay?: () => void; /** * Event Listener for when the video pauses */ onPause?: () => void; /** * Event Listener for when the video ends */ onEnded?: () => void; /** * Event Listener for when the video volume changes * @param volume - The current volume of the video */ onVolumeChange?: (volume: number) => void; onSeeking?: () => void; onSeeked?: () => void; onLoadedMetadata?: () => void; onLoadedData?: () => void; onCanPlay?: () => void; contextMenu?: boolean; contextMenuItems?: Array; settings?: boolean; settingsGroups?: Array; } type ContextMenuItem = { label: string; onClick: () => void; icon?: React.ReactNode; }; type SettingsGroup = { title: string; options: Array; }; type SettingsItem = { label: string; onClick: () => void; }; interface VideoElementProps { controls?: boolean; src: string | MediaStream | null; } type VideoCTX = Context<{ videoRef: React.RefObject; containerRef: React.RefObject; overlayRef: React.RefObject; seekPreview: boolean; setSeekPreview: React.Dispatch> | ((boolean: boolean) => void); menuClientY: number; setMenuClientY: React.Dispatch>; menuClientX: number; setMenuClientX: React.Dispatch>; contextMenuItems?: Array | []; setContextMenuItems: React.Dispatch>>; menuOpen: boolean; setMenuOpen: React.Dispatch>; src: string | MediaStream | null; setSrc: React.Dispatch>; }>; type VideoPlayerRef = { play: () => void; pause: () => void; seek: (time: number) => void; volume: (volume: number) => void; playbackRate: (rate: number) => void; toggleFullscreen: () => void; togglePip: () => void; toggleMute: () => void; togglePlay: () => void; setLoop: (loop: boolean) => void; }; /** * A Video Component * @param props - VideoProps * @returns A Video Component * @example * ```tsx *