Skip to content

Mute the microphone again after a voice reconnect during an interruption - #213

Merged
nozokada merged 2 commits into
adobe:feature/voicefrom
nozokada:fix/voice-reconnect-mute
Nov 24, 2026
Merged

nozokada merged 2 commits into
adobe:feature/voicefrom
nozokada:fix/voice-reconnect-mute

Conversation

@nozokada

Copy link
Copy Markdown
Member

Description

  • When a voice session reconnects while an audio interruption (for example, a phone call) is still active, VoiceSessionController now mutes the microphone again once the transport reports .connected. A reconnect with no interruption leaves the microphone alone.
  • VoiceTransport.setMicrophoneEnabled docs: it can be called while reconnecting as well as connected, and the mute is reapplied after a reconnect.
  • Demo LiveKitTransport header: replace the stale "pass it to every wrap/show/present call" guidance with registering one instance through Concierge.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 VoiceTransport contract describes .connected as "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?

  • Updated test_reconnecting_keepsTheSession_andReturnsToListening_mutedAgainWhileInterrupted (expects the mute to be reapplied).
  • Added test_reconnecting_withoutAnInterruption_leavesTheMicrophoneAlone.
  • Ran VoiceSessionControllerTests and ChatControllerVoiceSessionTests locally on the iOS simulator. The timing-based test_conversationLength_* tests occasionally fail under simulator load, and do so on feature/voice without this change too.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

nozokada and others added 2 commits November 24, 2026 14:55
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
nozokada marked this pull request as ready for review November 24, 2026 23:01
@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@nozokada
nozokada requested a review from cdhoffmann November 24, 2026 23:09
@nozokada
nozokada merged commit 3472553 into adobe:feature/voice Nov 24, 2026
12 checks passed
@nozokada
nozokada deleted the fix/voice-reconnect-mute branch November 24, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant