fix: keep preview effects moving through VFR frame holds - #855
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe video event handlers now poll ChangesVideo playback clock
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized playback fix keeps preview effects advancing during variable-frame-rate frame holds without changing public interfaces, dependencies, or deployment behavior. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Drive editor playback updates from
requestAnimationFrame()and the continuousvideo.currentTimemedia clock instead of waiting forrequestVideoFrameCallback().This keeps the playhead, cursor, zoom, wallpaper, and other time-based preview effects moving while a variable-frame-rate source holds a video frame.
Motivation
requestVideoFrameCallback()only runs when Chromium presents a new decoded frame. Sparse/VFR ScreenCaptureKit recordings can hold one frame for seconds, which previously froze the entire editor clock until the next frame arrived.Closes #854.
Type of Change
Related Issue(s)
Screenshots / Video
Not applicable; the regression is covered by the playback scheduler test.
Testing Guide
npx vitest --run src/components/video-editor/videoPlayback/videoEventHandlers.test.tsnpm test— 1,036 tests passednpx tsc --noEmitnpx biome lint src/components/video-editor/videoPlayback/videoEventHandlers.ts src/components/video-editor/videoPlayback/videoEventHandlers.test.tsnpx biome format src/components/video-editor/videoPlayback/videoEventHandlers.ts src/components/video-editor/videoPlayback/videoEventHandlers.test.tsChecklist
Summary by CodeRabbit