Browse Source
feat(sync): hybrid architecture for video/radar synchronization
feat(sync): hybrid architecture for video/radar synchronization
The previous synchronization logic relied on either naive relative time (causing drift) or expensive runtime date parsing (causing lag). This commit implements a hybrid "Baked Offset" architecture. Changes: - src/utils.js: Added `precomputeRadarVideoSync` to inject `videoSyncedTime` into every radar frame. Ported robust timestamp parsers from the modularize branch. - src/main.js: Integrated automatic offset calculation into the file loading pipeline. If filenames contain timestamps, the offset is now auto-calculated. - src/sync.js: Simplified the `videoFrameCallback` loop. It now treats the video as the "Master Clock" and looks up the pre-computed synced time, ensuring 60fps performance during playback and scrubbing. - UI: Manual offset adjustments now trigger a "re-bake" of the entire timeline instantly.refactor/sync-centralize
4 changed files with 79 additions and 50 deletions
Write
Preview
Loading…
Cancel
Save
Reference in new issue