Skip to content

Commit 12c11de

Browse files
authored
Fix microphone stopping after pre-connect audio (#1021)
1 parent f3efa6e commit 12c11de

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.changes/fix-preconnect-stops-mic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patch type="fixed" "Fix microphone stopping after pre-connect audio completes"

lib/src/preconnect/pre_connect_audio_buffer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ class PreConnectAudioBuffer {
210210
await _audioCapture?.stop();
211211
_audioCapture = null;
212212

213-
// Stop native recording session if it was started.
214-
if (_nativeRecordingStarted) {
213+
// Only stop native recording on error, the room's mic track still uses it.
214+
if (withError != null && _nativeRecordingStarted) {
215215
await webrtc.NativeAudioManagement.stopLocalRecording();
216216
}
217217

0 commit comments

Comments
 (0)