diff --git a/packages/media-console/src/VideoPlayer.tsx b/packages/media-console/src/VideoPlayer.tsx index ada0347..ad5c635 100644 --- a/packages/media-console/src/VideoPlayer.tsx +++ b/packages/media-console/src/VideoPlayer.tsx @@ -67,6 +67,7 @@ const AnimatedVideoPlayer = ( disableBack = false, disableVolume = false, disableFullscreen = false, + disableCaption = false, disableTimer = false, disableSeekbar = false, disablePlayPause = false, @@ -107,10 +108,12 @@ const AnimatedVideoPlayer = ( const [currentTime, setCurrentTime] = useState(0); const [error, setError] = useState(false); const [duration, setDuration] = useState(0); + const [isCaptionEnabled, setIsCaptionEnabled] = useState(false); const videoRef = props.videoRef || _videoRef; const toggleFullscreen = () => setIsFullscreen((prevState) => !prevState); + const toggleCaption = () => setIsCaptionEnabled((prevState) => !prevState); const toggleControls = () => setShowControls((prevState) => alwaysShowControls || !prevState); const toggleTimer = () => setShowTimeRemaining((prevState) => !prevState); @@ -404,6 +407,9 @@ const AnimatedVideoPlayer = (