open editor during recording finalization

This commit is contained in:
webadderall
2026-04-04 13:07:49 +11:00
parent 238281dcec
commit 443dbbc01f
+11 -1
View File
@@ -344,7 +344,7 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
}
}
await window.electronAPI.switchToEditor();
await window.electronAPI.notifyRecordingFinalized();
}, []);
const stopWebcamRecorder = useCallback(async () => {
@@ -375,6 +375,8 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
return null;
}
// Open editor early so it shows "Finalizing recording..." while we finalize
await window.electronAPI.openEditorEarly?.();
const webcamPath = await stopWebcamRecorder();
await finalizeRecordingSession(result.path, webcamPath);
return result.path;
@@ -531,6 +533,11 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
let finalPath = result.path;
// Open the editor window immediately so the user sees a
// "Finalizing recording…" screen instead of staring at the
// recorder UI while mux/IO completes.
await window.electronAPI.openEditorEarly();
if (isNativeWindows) {
const muxResult = await window.electronAPI.muxNativeWindowsRecording(pauseSegments);
if (!muxResult?.success) {
@@ -982,6 +989,9 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
cleanupCapturedMedia();
if (chunks.current.length === 0) return;
// Open editor window immediately while we process the recording
await window.electronAPI.openEditorEarly?.();
const duration = getRecordingDurationMs(Date.now());
const recordedChunks = chunks.current;
const buggyBlob = new Blob(recordedChunks, { type: mimeType });