fix: use drift-compensating scheduler in recording handler, fix media URL consistency

- Replace setInterval in recording handler with startCursorSampling() so
  the drift-compensating scheduler is used for actual recordings (was missed)
- Pass realpath-resolved path to buildMediaUrl for symlink consistency
- Use resolvedWebcamVideoUrl in thumbnail/export configs with file:// fallback
This commit is contained in:
webadderall
2026-04-18 19:03:36 +10:00
parent ffc5959994
commit dec004eddd
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -394,7 +394,7 @@ export function registerProjectHandlers() {
console.warn(`[get-local-media-url] Blocked unapproved path: ${resolved}`);
return { success: false as const };
}
return { success: true as const, url: buildMediaUrl(baseUrl, filePath) };
return { success: true as const, url: buildMediaUrl(baseUrl, resolved) };
});
}
+3 -3
View File
@@ -5,7 +5,7 @@ import path from "node:path";
import { promisify } from "node:util";
import { app, BrowserWindow, desktopCapturer, dialog, ipcMain, shell, systemPreferences } from "electron";
import { showCursor } from "../../cursorHider";
import { ALLOW_RECORDLY_WINDOW_CAPTURE, CURSOR_SAMPLE_INTERVAL_MS } from "../constants";
import { ALLOW_RECORDLY_WINDOW_CAPTURE } from "../constants";
import type { SelectedSource, NativeMacRecordingOptions, PauseSegment, CursorTelemetryPoint } from "../types";
import {
selectedSource,
@@ -53,7 +53,6 @@ import {
setCachedSystemCursorAssets,
cachedSystemCursorAssetsSourceMtimeMs,
setCachedSystemCursorAssetsSourceMtimeMs,
setCursorCaptureInterval,
setCursorCaptureStartTimeMs,
setActiveCursorSamples,
setPendingCursorSamples,
@@ -113,6 +112,7 @@ import {
clamp,
stopCursorCapture,
sampleCursorPoint,
startCursorSampling,
snapshotCursorTelemetryForPersistence,
} from "../cursor/telemetry";
import {
@@ -1083,7 +1083,7 @@ export function registerRecordingHandlers(
setLinuxCursorScreenPoint(null)
setLastLeftClick(null)
sampleCursorPoint()
setCursorCaptureInterval(setInterval(sampleCursorPoint, CURSOR_SAMPLE_INTERVAL_MS))
startCursorSampling()
void startInteractionCapture()
} else {
setIsCursorCaptureActive(false)
+3 -3
View File
@@ -781,7 +781,7 @@ export default function VideoEditor() {
padding,
cropRegion,
webcam,
webcamUrl: webcam.sourcePath ? toFileUrl(webcam.sourcePath) : null,
webcamUrl: resolvedWebcamVideoUrl ?? (webcam.sourcePath ? toFileUrl(webcam.sourcePath) : null),
videoWidth: previewVideo.videoWidth,
videoHeight: previewVideo.videoHeight,
annotationRegions,
@@ -3539,7 +3539,7 @@ export default function VideoEditor() {
videoPadding: padding,
cropRegion,
webcam,
webcamUrl: webcam.sourcePath ? toFileUrl(webcam.sourcePath) : null,
webcamUrl: resolvedWebcamVideoUrl ?? (webcam.sourcePath ? toFileUrl(webcam.sourcePath) : null),
annotationRegions,
autoCaptions,
autoCaptionSettings,
@@ -3708,7 +3708,7 @@ export default function VideoEditor() {
padding,
cropRegion,
webcam,
webcamUrl: webcam.sourcePath ? toFileUrl(webcam.sourcePath) : null,
webcamUrl: resolvedWebcamVideoUrl ?? (webcam.sourcePath ? toFileUrl(webcam.sourcePath) : null),
annotationRegions,
autoCaptions,
autoCaptionSettings,