From 2ecfe57a2e21874c0114ef1c5ea5f7d0bbf7c6f5 Mon Sep 17 00:00:00 2001 From: Felix Boehme Date: Thu, 31 Aug 2023 19:11:07 +0200 Subject: [PATCH] Renamed casting to isCasting --- src/video/components/actions/CaptionRendererAction.tsx | 4 ++-- src/video/components/actions/ProgressAction.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/components/actions/CaptionRendererAction.tsx b/src/video/components/actions/CaptionRendererAction.tsx index 343bdbaf..a5a77a02 100644 --- a/src/video/components/actions/CaptionRendererAction.tsx +++ b/src/video/components/actions/CaptionRendererAction.tsx @@ -53,7 +53,7 @@ export function CaptionRendererAction({ const videoTime = useProgress(descriptor).time; const { captionSettings, setCaptionDelay } = useSettings(); const captions = useRef([]); - const casting = getPlayerState(descriptor).casting.isCasting; + const isCasting = getPlayerState(descriptor).casting.isCasting; const captionSetRef = useRef<(delay: number) => void>(setCaptionDelay); useEffect(() => { @@ -98,7 +98,7 @@ export function CaptionRendererAction({ }, [] ); - if (casting) return null; + if (isCasting) return null; if (!captions.current.length) return null; const visibileCaptions = captions.current.filter(({ start, end }) => isVisible(start, end, captionSettings.delay, videoTime) diff --git a/src/video/components/actions/ProgressAction.tsx b/src/video/components/actions/ProgressAction.tsx index 82c56a8f..be3d4305 100644 --- a/src/video/components/actions/ProgressAction.tsx +++ b/src/video/components/actions/ProgressAction.tsx @@ -22,7 +22,7 @@ export function ProgressAction() { const controlRef = useRef(controls); const [hoverPosition, setHoverPosition] = useState(0); const [isThumbnailVisible, setIsThumbnailVisible] = useState(false); - const casting = getPlayerState(descriptor).casting.isCasting; + const isCasting = getPlayerState(descriptor).casting.isCasting; const onMouseOver = useCallback((e: MouseActivity) => { setHoverPosition(e.clientX); setIsThumbnailVisible(true); @@ -107,7 +107,7 @@ export function ProgressAction() { - {isThumbnailVisible && !casting ? ( + {isThumbnailVisible && !isCasting ? (