diff --git a/apps/expo/src/components/player/Controls.tsx b/apps/expo/src/components/player/Controls.tsx index 3c92a87..05a93d2 100644 --- a/apps/expo/src/components/player/Controls.tsx +++ b/apps/expo/src/components/player/Controls.tsx @@ -9,15 +9,9 @@ interface ControlsProps extends React.ComponentProps { export const Controls = ({ children, className }: ControlsProps) => { const idle = usePlayerStore((state) => state.interface.isIdle); - const setIsIdle = usePlayerStore((state) => state.setIsIdle); return ( - { - setIsIdle(false); - }} - className={className} - > + {!idle && children} ); diff --git a/apps/expo/src/components/player/MiddleControls.tsx b/apps/expo/src/components/player/MiddleControls.tsx index 42e769a..3baea7c 100644 --- a/apps/expo/src/components/player/MiddleControls.tsx +++ b/apps/expo/src/components/player/MiddleControls.tsx @@ -1,21 +1,31 @@ -import { View } from "react-native"; +import { TouchableWithoutFeedback, View } from "react-native"; +import { usePlayerStore } from "~/stores/player/store"; import { Controls } from "./Controls"; import { PlayButton } from "./PlayButton"; import { SeekButton } from "./SeekButton"; export const MiddleControls = () => { + const idle = usePlayerStore((state) => state.interface.isIdle); + const setIsIdle = usePlayerStore((state) => state.setIsIdle); + + const handleTouch = () => { + setIsIdle(!idle); + }; + return ( - - - - - - - - - - - + + + + + + + + + + + + + ); };