SDK: io.livekit.livekit-sdk (Unity) v1.3.8, iOS
When PlatformAudio is created, LiveKit_ConfigureAudioSessionForVoIP() correctly configures the AVAudioSession to PlayAndRecord category with VoiceChat mode and calls setActive:YES. However, when PlatformAudio.Dispose() is called, the underlying Rust WebRTC ADM tears down and internally calls setActive:NO — but the session is left in PlayAndRecord + VoiceChat configuration. No restore or reactivation occurs.
Any audio playback attempted after disposal (e.g. switching from a voice conversation to a listening to music in the same app session) is silent because Unity's audio engine cannot play through a deactivated VoIP-mode session.
To reproduce
- Create a PlatformAudio instance and connect a room (audio session enters PlayAndRecord + VoiceChat)
- Dispose PlatformAudio and disconnect the room
- Attempt to play audio via Unity AudioSource in a subsequent experience
Expected behavior
PlatformAudio.Dispose() restores the AVAudioSession to a neutral state (e.g. SoloAmbient with setActive:YES) so the host application's audio pipeline can resume normally.
Note: LiveKit_RestoreDefaultAudioSession() already exists in LiveKitAudioSession.mm but is never called by the SDK during teardown, and it does not call setActive:YES — so even if called manually it would leave the session deactivated.
SDK: io.livekit.livekit-sdk (Unity) v1.3.8, iOS
When PlatformAudio is created, LiveKit_ConfigureAudioSessionForVoIP() correctly configures the AVAudioSession to PlayAndRecord category with VoiceChat mode and calls setActive:YES. However, when PlatformAudio.Dispose() is called, the underlying Rust WebRTC ADM tears down and internally calls setActive:NO — but the session is left in PlayAndRecord + VoiceChat configuration. No restore or reactivation occurs.
Any audio playback attempted after disposal (e.g. switching from a voice conversation to a listening to music in the same app session) is silent because Unity's audio engine cannot play through a deactivated VoIP-mode session.
To reproduce
Expected behavior
PlatformAudio.Dispose() restores the AVAudioSession to a neutral state (e.g. SoloAmbient with setActive:YES) so the host application's audio pipeline can resume normally.
Note: LiveKit_RestoreDefaultAudioSession() already exists in LiveKitAudioSession.mm but is never called by the SDK during teardown, and it does not call setActive:YES — so even if called manually it would leave the session deactivated.