Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: duration bug in auto-finalize path and add i18n for pause tooltip

Siddharth7072c05edd45
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index c189b80bd..d6435cf02 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -456,7 +456,7 @@ export function LaunchWindow() {
</button>
{recording && (
- <Tooltip content={paused ? "Resume recording" : "Pause recording"}>
+ <Tooltip content={paused ? t("tooltips.resumeRecording") : t("tooltips.pauseRecording")}>
<button
className={`${hudIconBtnClasses} ${styles.electronNoDrag}`}
onClick={togglePaused}
diff --git a/src/hooks/useScreenRecorder.ts b/src/hooks/useScreenRecorder.ts
index 8e9296259..6c8fe0942 100644
--- a/src/hooks/useScreenRecorder.ts
+++ b/src/hooks/useScreenRecorder.ts
@@ -112,9 +112,7 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
const getRecordingDurationMs = useCallback(() => {
const segmentDuration =
- screenRecorder.current?.recorder.state === "recording" && segmentStartedAt.current
- ? Date.now() - segmentStartedAt.current
- : 0;
+ segmentStartedAt.current === null ? 0 : Date.now() - segmentStartedAt.current;
return accumulatedDurationMs.current + segmentDuration;
}, []);
diff --git a/src/i18n/locales/en/launch.json b/src/i18n/locales/en/launch.json
index 6e4a4ed89..eb57aefb8 100644
--- a/src/i18n/locales/en/launch.json
+++ b/src/i18n/locales/en/launch.json
@@ -3,6 +3,8 @@
"hideHUD": "Hide HUD",
"closeApp": "Close App",
"restartRecording": "Restart recording",
+ "pauseRecording": "Pause recording",
+ "resumeRecording": "Resume recording",
"openVideoFile": "Open video file",
"openProject": "Open project"
},
diff --git a/src/i18n/locales/es/launch.json b/src/i18n/locales/es/launch.json
index b25ec3df5..f53a92c5b 100644
--- a/src/i18n/locales/es/launch.json
+++ b/src/i18n/locales/es/launch.json
@@ -3,6 +3,8 @@
"hideHUD": "Ocultar HUD",
"closeApp": "Cerrar aplicación",
"restartRecording": "Reiniciar grabación",
+ "pauseRecording": "Pausar grabación",
+ "resumeRecording": "Reanudar grabación",
"openVideoFile": "Abrir archivo de video",
"openProject": "Abrir proyecto"
},
diff --git a/src/i18n/locales/zh-CN/launch.json b/src/i18n/locales/zh-CN/launch.json
index 84fdcef42..285111ea8 100644
--- a/src/i18n/locales/zh-CN/launch.json
+++ b/src/i18n/locales/zh-CN/launch.json
@@ -3,6 +3,8 @@
"hideHUD": "隐藏控制面板",
"closeApp": "关闭应用",
"restartRecording": "重新开始录制",
+ "pauseRecording": "暂停录制",
+ "resumeRecording": "继续录制",
"openVideoFile": "打开视频文件",
"openProject": "打开项目"
},