diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-27 00:55:15 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-29 15:56:48 +0200 |
| commit | 4d127a038bf768eded68aae3cfa5c1b12241bdac (patch) | |
| tree | 16bbb801caf6770546cff4fdb37b6408ec9ead98 /apps/web/src/lib/time.ts | |
| parent | 82817cb50cb0487350573d6129130aec705f924b (diff) | |
| download | opencut-4d127a038bf768eded68aae3cfa5c1b12241bdac.tar.gz | |
chore: normalize line endings
Diffstat (limited to 'apps/web/src/lib/time.ts')
| -rw-r--r-- | apps/web/src/lib/time.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/web/src/lib/time.ts b/apps/web/src/lib/time.ts index a6602566..aff42bee 100644 --- a/apps/web/src/lib/time.ts +++ b/apps/web/src/lib/time.ts @@ -207,7 +207,8 @@ export function getSnappedSeekTime({ fps: number; }): number { const snappedTime = snapTimeToFrame({ time: rawTime, fps }); - return Math.max(0, Math.min(duration, snappedTime)); + const lastFrame = getLastFrameTime({ duration, fps }); + return Math.max(0, Math.min(lastFrame, snappedTime)); } export function getLastFrameTime({ |
