Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix:Claim the countdown run before the first await.
Galactic993ba9e901c9f1
diff --git a/src/hooks/useScreenRecorder.ts b/src/hooks/useScreenRecorder.tsindex f208013ab..7c9112da1 100644--- a/src/hooks/useScreenRecorder.ts+++ b/src/hooks/useScreenRecorder.ts@@ -415,6 +415,10 @@ export function useScreenRecorder(): UseScreenRecorderReturn {return;}+ const runId = countdownRunId.current + 1;+ countdownRunId.current = runId;+ setCountdownActive(true);+let selectedSource: ProcessedDesktopSource | null = null;try {selectedSource = await window.electronAPI.getSelectedSource();@@ -422,15 +426,18 @@ export function useScreenRecorder(): UseScreenRecorderReturn {console.warn("Failed to read selected source before countdown:", error);}+ if (!isCountdownRunActive(runId)) {+ return;+ }+if (!selectedSource) {+ if (countdownRunId.current === runId) {+ setCountdownActive(false);+ }alert(t("recording.selectSource"));return;}- const runId = countdownRunId.current + 1;- countdownRunId.current = runId;- setCountdownActive(true);-try {const values = [3, 2, 1];const overlayShown = await safeShowCountdownOverlay(values[0], runId);