Merged
Conversation
|
|
pblazej
approved these changes
Sep 29, 2025
Contributor
pblazej
left a comment
There was a problem hiding this comment.
For a normal call, there's no difference in the error codes/logs:
// Before
2025-09-29T10:07:12+0200 debug LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession configuring category to: AVAudioSessionCategory(_rawValue: AVAudioSessionCategoryPlayAndRecord)
2025-09-29T10:07:12+0200 debug LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession activating...
2025-09-29T10:07:12+0200 error LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession failed to activate AudioSession with error: Error Domain=NSOSStatusErrorDomain Code=561017449 "Session activation failed" UserInfo={NSLocalizedDescription=Session activation failed}
2025-09-29T10:07:12+0200 debug LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession activationCount: 0, webRTCSessionCount: 0
2025-09-29T10:07:12+0200 debug LiveKitSDK: [LiveKit] AudioDeviceModuleDelegateAdapter.audioDeviceModule(_:willEnableEngine:isPlayoutEnabled:isRecordingEnabled:) AudioEngine pre-enable check, device permission: true
2025-09-29T10:07:12+0200 debug LiveKitSDK: [LiveKit] AudioDeviceModuleDelegateAdapter.audioDeviceModule(_:willEnableEngine:isPlayoutEnabled:isRecordingEnabled:) AudioEngine pre-enable check, audio session: AVAudioSessionCategoryPlayAndRecord
// After
2025-09-29T10:09:48+0200 debug LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession configuring category to: AVAudioSessionCategory(_rawValue: AVAudioSessionCategoryPlayAndRecord)
2025-09-29T10:09:48+0200 debug LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession activating...
2025-09-29T10:09:48+0200 error LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession failed to activate AudioSession with error: Error Domain=NSOSStatusErrorDomain Code=561017449 "Session activation failed" UserInfo={NSLocalizedDescription=Session activation failed}
2025-09-29T10:09:48+0200 debug LiveKitSDK: [LiveKit] AudioSessionEngineObserver.configure(oldState:newState:) AudioSession activationCount: 0, webRTCSessionCount: 0
It does not crash either...
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.
Move audio recording perms checks from SDK to WebRTC.
Patch: webrtc-sdk/webrtc#200
A simple way to test this would be trying to enable mic while in a phone call.
AVAudioSession activation fail will be detected in the lib, and report error instead of crashing.