"use client"; import { useEditor } from "@/hooks/use-editor"; import { formatTimeCode } from "@/lib/time"; import { invokeAction } from "@/lib/actions"; import { EditableTimecode } from "@/components/editable-timecode"; import { Button } from "@/components/ui/button"; import { FullScreenIcon, PauseIcon, PlayIcon, } from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; import { OcSocialIcon } from "@opencut/ui/icons"; import { Separator } from "@/components/ui/separator"; export function PreviewToolbar({ isFullscreen, onToggleFullscreen, }: { isFullscreen: boolean; onToggleFullscreen: () => void; }) { const editor = useEditor(); const isPlaying = editor.playback.getIsPlaying(); const currentTime = editor.playback.getCurrentTime(); const totalDuration = editor.timeline.getTotalDuration(); const fps = editor.project.getActive().settings.fps; return (
editor.playback.seek({ time })} className="text-center" /> / {formatTimeCode({ timeInSeconds: totalDuration, format: "HH:MM:SS:FF", fps, })}
); }