alpha(theme.colors.black, 0.3),
- justifyContent: "center",
- })}
- >
-
+
+
);
};
diff --git a/front/src/ui/player/controls/progress.tsx b/front/src/ui/player/controls/progress.tsx
index 4c92adab..89e33bb5 100644
--- a/front/src/ui/player/controls/progress.tsx
+++ b/front/src/ui/player/controls/progress.tsx
@@ -1,9 +1,9 @@
import { useState } from "react";
import type { TextProps } from "react-native";
import { useEvent, type VideoPlayer } from "react-native-video";
-import { useYoshiki } from "yoshiki/native";
import type { Chapter } from "~/models";
import { P, Slider } from "~/primitives";
+import { cn } from "~/utils";
export const ProgressBar = ({
player,
@@ -76,10 +76,9 @@ export const ProgressBar = ({
export const ProgressText = ({
player,
+ className,
...props
}: { player: VideoPlayer } & TextProps) => {
- const { css } = useYoshiki();
-
const [progress, setProgress] = useState(player.currentTime);
useEvent(player, "onProgress", (progress) => {
setProgress(progress.currentTime);
@@ -90,7 +89,7 @@ export const ProgressText = ({
});
return (
-
+
{toTimerString(progress, duration)} : {toTimerString(duration)}
);
diff --git a/front/src/ui/player/controls/touch.tsx b/front/src/ui/player/controls/touch.tsx
index 0737fbb0..64d68fe7 100644
--- a/front/src/ui/player/controls/touch.tsx
+++ b/front/src/ui/player/controls/touch.tsx
@@ -4,13 +4,12 @@ import {
Platform,
Pressable,
type PressableProps,
- StyleSheet,
View,
type ViewProps,
} from "react-native";
import { useEvent, type VideoPlayer } from "react-native-video";
-import { useYoshiki } from "yoshiki/native";
import { useIsTouch } from "~/primitives";
+import { cn } from "~/utils";
import { toggleFullscreen } from "./misc";
export const TouchControls = ({
@@ -22,7 +21,6 @@ export const TouchControls = ({
player: VideoPlayer;
forceShow?: boolean;
} & ViewProps) => {
- const { css } = useYoshiki();
const isTouch = useIsTouch();
const [playing, setPlay] = useState(player.isPlaying);
@@ -31,7 +29,7 @@ export const TouchControls = ({
});
const [_show, setShow] = useState(false);
- const hideTimeout = useRef(null);
+ const hideTimeout = useRef(null);
const shouldShow = forceShow || _show || !playing;
const show = useCallback((val: boolean = true) => {
setShow(val);
@@ -90,10 +88,7 @@ export const TouchControls = ({
// instantly hide the controls when mouse leaves the view
if (e.nativeEvent.pointerType === "mouse") show(false);
}}
- {...css({
- cursor: (shouldShow ? "unset" : "none") as any,
- ...StyleSheet.absoluteFillObject,
- })}
+ className={cn("absolute inset-0", !shouldShow && "cursor-none")}
/>
{shouldShow && children}
@@ -107,7 +102,7 @@ const DoublePressable = ({
}: {
onDoublePress: (e: GestureResponderEvent) => boolean | undefined;
} & PressableProps) => {
- const touch = useRef<{ count: number; timeout?: NodeJS.Timeout }>({
+ const touch = useRef<{ count: number; timeout?: NodeJS.Timeout | number }>({
count: 0,
});
diff --git a/front/src/ui/player/controls/tracks-menu.tsx b/front/src/ui/player/controls/tracks-menu.tsx
index 698066c9..c4712bc8 100644
--- a/front/src/ui/player/controls/tracks-menu.tsx
+++ b/front/src/ui/player/controls/tracks-menu.tsx
@@ -5,12 +5,11 @@ import VideoSettings from "@material-symbols/svg-400/rounded/video_settings-fill
import { type ComponentProps, createContext, useContext } from "react";
import { useTranslation } from "react-i18next";
import { useEvent, type VideoPlayer } from "react-native-video";
-import { useForceRerender } from "yoshiki";
import { IconButton, Menu, tooltip } from "~/primitives";
import { useFetch } from "~/query";
import { useDisplayName, useSubtitleName } from "~/track-utils";
import { Info } from "~/ui/info";
-import { useQueryState } from "~/utils";
+import { useForceRerender, useQueryState } from "~/utils";
type MenuProps = ComponentProps