1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Renamed casting to isCasting

This commit is contained in:
Felix Boehme 2023-08-31 19:11:07 +02:00
parent a8662d02d4
commit 2ecfe57a2e
No known key found for this signature in database
GPG key ID: 7EB0603E4E9642EA
2 changed files with 4 additions and 4 deletions

View file

@ -53,7 +53,7 @@ export function CaptionRendererAction({
const videoTime = useProgress(descriptor).time; const videoTime = useProgress(descriptor).time;
const { captionSettings, setCaptionDelay } = useSettings(); const { captionSettings, setCaptionDelay } = useSettings();
const captions = useRef<ContentCaption[]>([]); const captions = useRef<ContentCaption[]>([]);
const casting = getPlayerState(descriptor).casting.isCasting; const isCasting = getPlayerState(descriptor).casting.isCasting;
const captionSetRef = useRef<(delay: number) => void>(setCaptionDelay); const captionSetRef = useRef<(delay: number) => void>(setCaptionDelay);
useEffect(() => { useEffect(() => {
@ -98,7 +98,7 @@ export function CaptionRendererAction({
}, },
[] []
); );
if (casting) return null; if (isCasting) return null;
if (!captions.current.length) return null; if (!captions.current.length) return null;
const visibileCaptions = captions.current.filter(({ start, end }) => const visibileCaptions = captions.current.filter(({ start, end }) =>
isVisible(start, end, captionSettings.delay, videoTime) isVisible(start, end, captionSettings.delay, videoTime)

View file

@ -22,7 +22,7 @@ export function ProgressAction() {
const controlRef = useRef<typeof controls>(controls); const controlRef = useRef<typeof controls>(controls);
const [hoverPosition, setHoverPosition] = useState<number>(0); const [hoverPosition, setHoverPosition] = useState<number>(0);
const [isThumbnailVisible, setIsThumbnailVisible] = useState<boolean>(false); const [isThumbnailVisible, setIsThumbnailVisible] = useState<boolean>(false);
const casting = getPlayerState(descriptor).casting.isCasting; const isCasting = getPlayerState(descriptor).casting.isCasting;
const onMouseOver = useCallback((e: MouseActivity) => { const onMouseOver = useCallback((e: MouseActivity) => {
setHoverPosition(e.clientX); setHoverPosition(e.clientX);
setIsThumbnailVisible(true); setIsThumbnailVisible(true);
@ -107,7 +107,7 @@ export function ProgressAction() {
</div> </div>
</div> </div>
</div> </div>
{isThumbnailVisible && !casting ? ( {isThumbnailVisible && !isCasting ? (
<ThumbnailAction <ThumbnailAction
parentRef={ref} parentRef={ref}
videoTime={videoTime} videoTime={videoTime}