This commit is contained in:
talksik
2026-04-08 16:13:30 -07:00
parent ca7b408d37
commit 4c60957657
@@ -102,12 +102,11 @@ export function useScreenRecorder({
window.electronScreen.startRecordingWindow(); window.electronScreen.startRecordingWindow();
// Listen for stop from floating window // Listen for stop from floating window
const cleanup = window.electronScreen.onStopRequested(() => { cleanupIpcRef.current = window.electronScreen.onStopRequested(() => {
if (recorderRef.current?.state === "recording") { if (recorderRef.current?.state === "recording") {
recorderRef.current.stop(); recorderRef.current.stop();
} }
}); });
cleanupIpcRef.current = cleanup;
} catch (err) { } catch (err) {
stopAllTracks(); stopAllTracks();
window.electronScreen.stopRecordingWindow(); window.electronScreen.stopRecordingWindow();