mirror of
https://github.com/p-stream/p-stream.git
synced 2026-05-13 20:40:59 +00:00
15 lines
477 B
TypeScript
15 lines
477 B
TypeScript
import { Icons } from "@/components/Icon";
|
|
import { VideoPlayerButton } from "@/components/player/internals/Button";
|
|
import { usePlayerStore } from "@/stores/player/store";
|
|
|
|
export function Fullscreen() {
|
|
const { isFullscreen } = usePlayerStore((s) => s.interface);
|
|
const display = usePlayerStore((s) => s.display);
|
|
|
|
return (
|
|
<VideoPlayerButton
|
|
onClick={() => display?.toggleFullscreen()}
|
|
icon={isFullscreen ? Icons.COMPRESS : Icons.EXPAND}
|
|
/>
|
|
);
|
|
}
|