"use client"; import { CrosshairIcon, SquareIcon } from "lucide-react"; import { ControlButton, usePlayer } from "./PlayerProvider"; import { LocalFilePicker } from "./LocalFilePicker"; import { LocalClipPanel } from "./LocalClipPanel"; import { formatOffset } from "../lib/localFileClock"; // THE VISITOR'S OWN COPY, IN THE MODAL (lane missing-source, slice 2). // - No copy, source still public: the plain "Play your own copy" control and // its one-sentence promise. (A source no longer public has the same control // in the player slot's panel, so nothing shows here.) // - A copy playing: its name, the offset, the four nudges, "This line is // playing now" (the next cue click sets the offset) and Stop, which gives // the focus back to the "Play your own copy" control in its place; and // "Clip my copy" (LocalClipPanel), which cuts the marked clip from it. // // Nothing in this file may reach the network or storage (the offset is written // by the provider through lib/localFileClock.ts); LocalFilePicker.test.ts // reads this source too. const NUDGES: ReadonlyArray<{ delta: number; label: string; title: string }> = [ { delta: -1, label: "−1 s", title: "Offset −1 second" }, { delta: -0.1, label: "−0.1 s", title: "Offset −0.1 second" }, { delta: 0.1, label: "+0.1 s", title: "Offset +0.1 second" }, { delta: 1, label: "+1 s", title: "Offset +1 second" }, ]; // ControlButton shows `icon ?? char` before its label; a nudge's label is its // whole face. const NO_ICON =