import React, { CSSProperties } from "react"; import "./video-audio-player.css"; export type preload = "auto" | "metadata" | "none" | ""; export type VideoControlOptionsToRemove = "center-playPause-button" | "bottom-playPause-button" | "pip" | "progress" | "current-time" | "fullscreen" | "duration" | "mute" | "volume" | "playbackRate" | "skip-forward-backward" | "captions"; export type VideoMimeType = "video/mp4" | "video/webm" | "video/ogg" | "video/quicktime" | "application/x-mpegURL" | "application/vnd.apple.mpegurl" | "application/dash+xml" | (string & {}); export type TrackKind = "subtitles" | "captions" | "descriptions" | "chapters" | "metadata"; export type sources = { src: string; type: VideoMimeType; }[]; export interface Track { src: string; kind: TrackKind; label: string; srclang: string; default?: boolean; } export interface VideoPreviewOptions { mode?: "clip" | "random"; duration?: number; start?: number; loop?: boolean; } export interface PlaylistItem { src: string; duration: number; start?: number; end?: number; } export interface PlaylistConfig { items: PlaylistItem[]; loop?: boolean; } export interface Chapter { time: number; label: string; } export interface VideoPlayerIcons { play?: React.ReactNode; pause?: React.ReactNode; mute?: React.ReactNode; unmute?: React.ReactNode; volume?: React.ReactNode; fullscreen?: React.ReactNode; exitFullscreen?: React.ReactNode; pictureInPicture?: React.ReactNode; exitPictureInPicture?: React.ReactNode; rewind?: React.ReactNode; forward?: React.ReactNode; download?: React.ReactNode; error?: React.ReactNode; captions?: React.ReactNode; settings?: React.ReactNode; nextTrack?: React.ReactNode; prevTrack?: React.ReactNode; } export interface VideoPlayerProps { src?: string; accentColor?: string; customErrorMessage?: string; controls?: boolean; autoPlay?: boolean; muted?: boolean; loop?: boolean; playsInline?: boolean; poster?: string; preload?: preload; width?: string | number; height?: string | number; className?: string; style?: CSSProperties; seekTo?: number; defaultPlaybackRate?: number; defaultVolume?: number; sources?: sources; controlsToExclude?: VideoControlOptionsToRemove[]; disableDoubleClick?: boolean; doubleClickToFullscreen?: boolean; showDownloadButton?: boolean; disableShortcuts?: boolean; tracks?: Track[]; onProgress?: (currentTime: number, duration: number) => void; onSeeked?: (time: number) => void; onSeeking?: (time: number) => void; onVolumeChange?: (volume: number) => void; onPlaybackRateChange?: (rate: number) => void; onMuteChange?: (isMuted: boolean) => void; onFullscreenChange?: (isFullscreen: boolean) => void; onPictureInPictureChange?: (isPictureInPicture: boolean) => void; onDownloadStart?: () => void; onDownloadEnd?: (success: boolean) => void; onPlay?: () => void; onPause?: () => void; onEnded?: () => void; onError?: () => void; onReady?: () => void; onDuration?: (duration: number) => void; getVideoRef?: (ref: HTMLVideoElement | null) => void; onTrackChange?: (track: TextTrack | null) => void; generatePosterAt?: number; preview?: VideoPreviewOptions; playlist?: PlaylistConfig; chapters?: Chapter[]; maxAutoPlayDuration?: number; pauseWhenHidden?: boolean; quality?: number | string; onQualityChange?: (level: number, label: string) => void; onVisibilityChange?: (isVisible: boolean) => void; onBuffering?: (isBuffering: boolean) => void; ambientMode?: boolean; icons?: VideoPlayerIcons; } declare const VideoPlayer: ({ src, accentColor, customErrorMessage, controls, autoPlay, muted, loop, playsInline, poster, width, height, className, style, preload, seekTo, defaultPlaybackRate, defaultVolume, sources, controlsToExclude, disableDoubleClick, doubleClickToFullscreen, showDownloadButton, disableShortcuts, onProgress, onSeeked, onSeeking, onVolumeChange, onPlaybackRateChange, onMuteChange, onFullscreenChange, onPictureInPictureChange, onDownloadStart, onDownloadEnd, onPlay, onPause, onEnded, onError, onReady, onDuration, getVideoRef, tracks, onTrackChange, generatePosterAt, preview, playlist, chapters, maxAutoPlayDuration, pauseWhenHidden, quality, onQualityChange, onVisibilityChange, onBuffering, ambientMode, icons, }: VideoPlayerProps) => React.JSX.Element; export default VideoPlayer;