From cfc85a1e9358586d53b794e3fcd1307bde2c5c52 Mon Sep 17 00:00:00 2001 From: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Thu, 5 Mar 2026 20:27:12 +0900 Subject: [PATCH] patch --- .changes/fix-preconnect-stops-mic | 1 + lib/src/preconnect/pre_connect_audio_buffer.dart | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-preconnect-stops-mic diff --git a/.changes/fix-preconnect-stops-mic b/.changes/fix-preconnect-stops-mic new file mode 100644 index 000000000..d027cc559 --- /dev/null +++ b/.changes/fix-preconnect-stops-mic @@ -0,0 +1 @@ +patch type="fixed" "Fix microphone stopping after pre-connect audio completes" diff --git a/lib/src/preconnect/pre_connect_audio_buffer.dart b/lib/src/preconnect/pre_connect_audio_buffer.dart index 0dedf25ea..b4146ca02 100644 --- a/lib/src/preconnect/pre_connect_audio_buffer.dart +++ b/lib/src/preconnect/pre_connect_audio_buffer.dart @@ -210,8 +210,8 @@ class PreConnectAudioBuffer { await _audioCapture?.stop(); _audioCapture = null; - // Stop native recording session if it was started. - if (_nativeRecordingStarted) { + // Only stop native recording on error, the room's mic track still uses it. + if (withError != null && _nativeRecordingStarted) { await webrtc.NativeAudioManagement.stopLocalRecording(); }