From dcf54c1250431f5a4a2848f7c07781ef5eebacaf Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 31 Mar 2026 04:03:52 +0200 Subject: feat: migrate time utilities from typescript to rust WASM --- apps/web/src/hooks/timeline/use-timeline-playhead.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'apps/web/src/hooks/timeline/use-timeline-playhead.ts') diff --git a/apps/web/src/hooks/timeline/use-timeline-playhead.ts b/apps/web/src/hooks/timeline/use-timeline-playhead.ts index e6204f23..d4cfcc06 100644 --- a/apps/web/src/hooks/timeline/use-timeline-playhead.ts +++ b/apps/web/src/hooks/timeline/use-timeline-playhead.ts @@ -1,4 +1,4 @@ -import { getSnappedSeekTime } from "@/lib/time"; +import { getSnappedSeekTime } from "opencut-wasm"; import { useEffect, useCallback, useRef } from "react"; import { useEdgeAutoScroll } from "@/hooks/timeline/use-edge-auto-scroll"; import { useEditor } from "../use-editor"; @@ -83,11 +83,7 @@ export function useTimelinePlayhead({ ); const framesPerSecond = activeProject.settings.fps; - const frameTime = getSnappedSeekTime({ - rawTime, - duration, - fps: framesPerSecond, - }); + const frameTime = getSnappedSeekTime({ rawTime, duration, fps: framesPerSecond }); const shouldSnap = snappingEnabled && !isShiftHeldRef.current; const time = (() => { -- cgit v1.3.1