/react-video-player

A React video player base on html 5 video tag

Primary LanguageTypeScript

This project was as react example Demo.

Available Scripts

In the project directory, you can run:

npm start

Usage

<VideoPlayer source={VIDEO_SOURCE}   id="firstPlayer" />

Hook

    const videoElement = useRef<HTMLVideoElement>(null)
    const { 
        togglePlay, 
        isPlaying,
        onFullScreen,
        onMuted,
        handleVideoSpeed,
        currentSpeed,
        muted,
        onUpdateProgress,
        duration,
        progress,
        onVolumeChange,
        currentVolume,
        handleManualProgress,
        currentTime,
        watchAgain,
        isVideoEnd
     } = useVideoPlayer(videoElement)

Deploy

This project is using amplify in order to move faster with the demo