A small web app for watching movies and shows easily
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
528 B

import { Icons } from "@/components/Icon";
import { VideoPlayerButton } from "@/components/player/internals/Button";
import { usePlayerStore } from "@/stores/player/store";
export function Pause() {
const display = usePlayerStore((s) => s.display);
const { isPaused } = usePlayerStore((s) => s.mediaPlaying);
const toggle = () => {
if (isPaused) display?.play();
else display?.pause();
};
return (
<VideoPlayerButton
onClick={toggle}
icon={isPaused ? Icons.PLAY : Icons.PAUSE}
/>
);
}