Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(editor): skip accurate frame when crop preview is available

Richie McIlroy52903b702527
diff --git a/apps/desktop/src/routes/editor/Editor.tsx b/apps/desktop/src/routes/editor/Editor.tsx
index 74743ce31..9638b7cb1 100644
--- a/apps/desktop/src/routes/editor/Editor.tsx
+++ b/apps/desktop/src/routes/editor/Editor.tsx
@@ -1027,6 +1027,19 @@ function Dialogs() {
),
});
+ if (initialPreviewUrl) {
+ logCropProfile("accurate-frame-skipped", {
+ elapsedMs: Number(
+ (performance.now() - cropOpenedAt).toFixed(2),
+ ),
+ recordingDurationSec: Math.round(
+ editorInstance.recordingDuration,
+ ),
+ reason: "current-preview-available",
+ });
+ return;
+ }
+
scheduleAccurateFrame("immediate", {
idleTimeoutMs: 500,
fallbackDelayMs: 16,