From 6447e95d7dfc0d04f8a25d26dc547de9c44fabef Mon Sep 17 00:00:00 2001 From: elpatron Date: Wed, 3 Jun 2026 18:22:30 +0200 Subject: [PATCH] fix: defer stopping media stream tracks until media recorder finishes stopping --- client/src/components/LiveVoiceCapture.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/LiveVoiceCapture.tsx b/client/src/components/LiveVoiceCapture.tsx index 24677fc..ff75c10 100644 --- a/client/src/components/LiveVoiceCapture.tsx +++ b/client/src/components/LiveVoiceCapture.tsx @@ -110,8 +110,7 @@ export default function LiveVoiceCapture({ if (!recorder || recorder.state !== 'recording') return recorder.stop() clearTimer() - stopStream() - }, [clearTimer, stopStream]) + }, [clearTimer]) const startRecording = async () => { setMicError(null) @@ -141,6 +140,7 @@ export default function LiveVoiceCapture({ ) const blob = new Blob(chunksRef.current, { type: resolvedMime }) chunksRef.current = [] + stopStream() try { assertVoiceMemoBlobSize(blob) finishRecording(blob, resolvedMime, durationSec)