From fde88533357b4f108f406a554ff541a09c7690df Mon Sep 17 00:00:00 2001 From: Ovidiu Cristescu <55203625+LunatiqueCoder@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:54:46 +0200 Subject: [PATCH] =?UTF-8?q?feat/add-caption-control=20=F0=9F=91=89=20fix?= =?UTF-8?q?=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/media-console/src/VideoPlayer.tsx | 10 ++++++---- .../media-console/src/components/BottomControls.tsx | 6 +++--- packages/media-console/src/components/Caption.tsx | 7 +++---- packages/media-console/src/types.ts | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/media-console/src/VideoPlayer.tsx b/packages/media-console/src/VideoPlayer.tsx index 6b1fcaf..dd9335e 100644 --- a/packages/media-console/src/VideoPlayer.tsx +++ b/packages/media-console/src/VideoPlayer.tsx @@ -107,12 +107,12 @@ const AnimatedVideoPlayer = ( const [currentTime, setCurrentTime] = useState(0); const [error, setError] = useState(false); const [duration, setDuration] = useState(0); - const [isCaption, setIsCaption] = useState(false); + const [isCaptionEnabled, setIsCaptionEnabled] = useState(false); const videoRef = props.videoRef || _videoRef; const toggleFullscreen = () => setIsFullscreen((prevState) => !prevState); - const toggleCaption = () => setIsCaption((prevState) => !prevState); + const toggleCaption = () => setIsCaptionEnabled((prevState) => !prevState); const toggleControls = () => setShowControls((prevState) => alwaysShowControls || !prevState); const toggleTimer = () => setShowTimeRemaining((prevState) => !prevState); @@ -407,7 +407,9 @@ const AnimatedVideoPlayer = (