80bd589c03
Introduces new props (volume, playbackRate, currentTime) to VideoPlayer and VideoElement components, allowing external control of volume, playback speed, and initial playback position. Also adds related event handlers (onRateChange, onFullscreenChange, onPictureInPictureChange, onProgress, onDurationChange, onWaiting, onCanPlay) and updates documentation and types accordingly.
32 lines
888 B
TypeScript
32 lines
888 B
TypeScript
// Main component
|
|
export { VideoPlayer } from './components/VideoPlayer'
|
|
|
|
// Context
|
|
export { PlayerProvider, usePlayerContext } from './contexts/PlayerContext'
|
|
|
|
// Types
|
|
export type {
|
|
VideoPlayerProps,
|
|
SubtitleTrack,
|
|
AudioTrack,
|
|
VideoQuality,
|
|
PlayerTheme,
|
|
VideoState,
|
|
UIState,
|
|
PlayerSettings,
|
|
PlayerContextValue,
|
|
} from './types'
|
|
|
|
// Utils
|
|
export { formatTime, parseTime } from './utils/time'
|
|
export { parseSRT, createSubtitleBlobURL, fetchSubtitle } from './utils/subtitles'
|
|
export { validateVideoURL, getCORSErrorMessage, isCORSError, checkVideoCORS } from './utils/corsHelper'
|
|
|
|
// i18n
|
|
export { getTranslations, detectBrowserLanguage, translations } from './i18n'
|
|
export type { Translations } from './i18n'
|
|
|
|
// Hooks (for advanced users)
|
|
export { useKeyboardShortcuts } from './hooks/useKeyboardShortcuts'
|
|
export { useTouchGestures } from './hooks/useTouchGestures'
|