diff options
| author | Zaka <149817565+ZakaHaceCosas@users.noreply.github.com> | 2025-08-15 23:01:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-15 23:01:18 +0200 |
| commit | 7e4cd767622e3e1a09e76770ce800f4a541cf0e8 (patch) | |
| tree | a7cc92bc6d1fe1686da096cb67e308cedc731f5a /apps/web/src/components/ui/editable-timecode.tsx | |
| parent | 033a9aa1bcc06ee82d611ac2c7deb5575c2fa803 (diff) | |
| download | opencut-7e4cd767622e3e1a09e76770ce800f4a541cf0e8.tar.gz | |
feat: add an input so the user can go to a specific timestamp (#530)
* feat: add an input so the user can go to a specific timestamp
* fix: use TimeCode type for EditableTimecodeProps
* cleanup
---------
Co-authored-by: Maze Winther <mazewinther@gmail.com>
Diffstat (limited to 'apps/web/src/components/ui/editable-timecode.tsx')
| -rw-r--r-- | apps/web/src/components/ui/editable-timecode.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/src/components/ui/editable-timecode.tsx b/apps/web/src/components/ui/editable-timecode.tsx index f6d29f49..404831f6 100644 --- a/apps/web/src/components/ui/editable-timecode.tsx +++ b/apps/web/src/components/ui/editable-timecode.tsx @@ -2,12 +2,13 @@ import { useState, useRef, useEffect } from "react";
import { cn } from "@/lib/utils";
-import { formatTimeCode, parseTimeCode } from "@/lib/time";
+import { formatTimeCode, parseTimeCode, TimeCode } from "@/lib/time";
+import { DEFAULT_FPS } from "@/stores/project-store";
interface EditableTimecodeProps {
time: number;
duration?: number;
- format?: "MM:SS" | "HH:MM:SS" | "HH:MM:SS:CS" | "HH:MM:SS:FF";
+ format?: TimeCode;
fps?: number;
onTimeChange?: (time: number) => void;
className?: string;
@@ -18,7 +19,7 @@ export function EditableTimecode({ time,
duration,
format = "HH:MM:SS:FF",
- fps = 30,
+ fps = DEFAULT_FPS,
onTimeChange,
className,
disabled = false,
|
