UNPKG

react-stv-player

Version:

A highly customizable React video player built on Video.js, supporting custom buttons, themes, and advanced playback controls.

20 lines (19 loc) 865 B
import { default as React } from 'react'; import { default as videojs } from 'video.js'; import { default as Player } from 'video.js/dist/types/player'; import { VideoJsPlayerOptions } from '../types'; export interface VideoPlayerProps extends VideoJsPlayerOptions { className?: string; onReady?: (player: Player) => void; onPlay?: () => void; onPause?: () => void; onEnded?: () => void; onError?: (error: any) => void; onDuration?: (duration: number) => void; onProgress?: (progress: number) => void; onAudioTracks?: (audioTracks: typeof videojs.AudioTrack) => void; onQualityTracks?: (qualityTracks: any) => void; onSubtitleTracks?: (textTracks: videojs.TextTrack) => void; } export declare const VideoPlayer: React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<Player>>; export default VideoPlayer;