Repository navigation
Mute the microphone again after a voice reconnect during an interruption - #213
Merged
Merged
Conversation
A transport may come back from a reconnect with the microphone live, so reapply the interruption mute when the session returns to listening. Document that setMicrophoneEnabled can be called while reconnecting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nozokada
marked this pull request as ready for review
November 24, 2026 23:01
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
VoiceSessionControllernow mutes the microphone again once the transport reports.connected. A reconnect with no interruption leaves the microphone alone.VoiceTransport.setMicrophoneEnableddocs: it can be called while reconnecting as well as connected, and the mute is reapplied after a reconnect.LiveKitTransportheader: replace the stale "pass it to everywrap/show/presentcall" guidance with registering one instance throughConcierge.setVoiceTransport(_:).Related Issue
Follow-up to the voice transport work merged into
feature/voice(#189, #191), found while comparing with review feedback on the Android SDK.Motivation and Context
The
VoiceTransportcontract describes.connectedas "with the microphone live", and the old code assumed the transport keeps an earlier mute across a reconnect. The LiveKit Swift SDK does keep it (muted tracks are not republished), but a custom transport written to the documented contract could reopen the microphone mid-interruption. Reapplying the mute removes that dependency on transport behaviour.How Has This Been Tested?
test_reconnecting_keepsTheSession_andReturnsToListening_mutedAgainWhileInterrupted(expects the mute to be reapplied).test_reconnecting_withoutAnInterruption_leavesTheMicrophoneAlone.VoiceSessionControllerTestsandChatControllerVoiceSessionTestslocally on the iOS simulator. The timing-basedtest_conversationLength_*tests occasionally fail under simulator load, and do so onfeature/voicewithout this change too.Types of changes
Checklist: