import React from 'react'; import type { VideoPlayerConfig, VideoState, Theme } from '../types'; import { type LayoutRectangle } from 'react-native'; import type { VideoRef } from 'react-native-video'; /** * Represents the state of the VideoProvider. * @internal */ interface VideoProviderState extends VideoState { /** * The configuration for the video player. */ config: VideoPlayerConfig; /** * The theme for the video player. */ theme: Theme; /** * A ref to the video component. */ videoRef: React.RefObject | null; /** * Whether the controls are visible. */ controlsVisible: boolean; /** * A timeout ref for hiding the controls. */ hideTimeoutRef: NodeJS.Timeout | null; /** * The layout of the video component. */ videoLayout: LayoutRectangle; /** * The layout of the video wrapper View. */ videoWrapperLayout: LayoutRectangle; /** * The dimensions of the screen. */ dimensions: { width: number; height: number; }; /** * A unique identifier for the portal host associated with this provider. */ portalHostName: string; } /** * Represents the actions that can be dispatched to the video reducer. * @internal */ type Action = { type: 'INITIALIZE'; payload: { theme?: Partial; config?: Partial; }; } | { type: 'SET_VIDEO_REF'; payload: React.RefObject; } | { type: 'SHOW_CONTROLS'; } | { type: 'HIDE_CONTROLS'; } | { type: 'SET_CONTROLS_VISIBLE'; payload: boolean; } | { type: 'SEEK'; payload: number; } | { type: 'TOGGLE_PLAY_PAUSE'; } | { type: 'SET_VOLUME'; payload: number; } | { type: 'TOGGLE_MUTE'; } | { type: 'TOGGLE_FULLSCREEN'; } | { type: 'SET_PLAYING'; payload: boolean; } | { type: 'SET_CURRENT_TIME'; payload: number; } | { type: 'SET_PLAYABLE_DURATION'; payload: number; } | { type: 'SET_DURATION'; payload: number; } | { type: 'SET_BUFFERING'; payload: boolean; } | { type: 'SET_ERROR'; payload: string | null; } | { type: 'SET_HIDE_TIMEOUT'; payload: NodeJS.Timeout | null; } | { type: 'SET_VIDEO_LAYOUT'; payload: LayoutRectangle; } | { type: 'SET_VIDEO_WRAPPER_LAYOUT'; payload: LayoutRectangle; } | { type: 'SET_DIMENSIONS'; payload: { width: number; height: number; }; } | { type: 'SET_PLAYBACK_RATE'; payload: number; }; /** * The provider component for the video player. * This component provides the video state to all its children. */ export declare const VideoProvider: React.FC<{ children: React.ReactNode; /** * The configuration for the video player. */ config?: Partial; /** * The theme for the video player. */ theme?: Partial; }>; /** * A hook to use the video context. * This hook provides access to the video state and dispatch function. */ export declare const useVideo: () => { state: VideoProviderState; dispatch: React.Dispatch; }; export {}; //# sourceMappingURL=VideoProvider.d.ts.map