analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
50 lines • 2.08 kB
TypeScript
import { DownloadContent } from '../DownloadButton/DownloadButton';
/**
* VideoPlayer component props interface
*/
interface VideoPlayerProps {
/** Video source URL */
src: string;
/** Video poster/thumbnail URL */
poster?: string;
/** Subtitles URL */
subtitles?: string;
/** Video title */
title?: string;
/** Video subtitle/description */
subtitle?: string;
/** Initial playback time in seconds */
initialTime?: number;
/** Callback fired when video time updates (seconds) */
onTimeUpdate?: (seconds: number) => void;
/** Callback fired with progress percentage (0-100) */
onProgress?: (progress: number) => void;
/** Callback fired when video completes (>95% watched) */
onVideoComplete?: () => void;
/** Additional CSS classes */
className?: string;
/** Auto-save progress to localStorage */
autoSave?: boolean;
/** localStorage key for saving progress */
storageKey?: string;
/** Download content URLs for lesson materials */
downloadContent?: DownloadContent;
/** Show download button in header */
showDownloadButton?: boolean;
/** Callback fired when download starts */
onDownloadStart?: (contentType: string) => void;
/** Callback fired when download completes */
onDownloadComplete?: (contentType: string) => void;
/** Callback fired when download fails */
onDownloadError?: (contentType: string, error: Error) => void;
}
/**
* Video player component with controls and progress tracking
* Integrates with backend lesson progress system
*
* @param props - VideoPlayer component props
* @returns Video player element with controls
*/
declare const VideoPlayer: ({ src, poster, subtitles, title, subtitle: subtitleText, initialTime, onTimeUpdate, onProgress, onVideoComplete, className, autoSave, storageKey, downloadContent, showDownloadButton, onDownloadStart, onDownloadComplete, onDownloadError, }: VideoPlayerProps) => import("react/jsx-runtime").JSX.Element;
export default VideoPlayer;
//# sourceMappingURL=VideoPlayer.d.ts.map