-
Notifications
You must be signed in to change notification settings - Fork 164
Change default other-audio-ducking configuration #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
📝 WalkthroughWalkthroughThis PR updates the LiveKit iOS SDK to support advanced audio ducking capabilities by bumping the WebRTC dependency version across multiple manifest files, adding documentation explaining the ducking behavior, and refactoring the audio ducking implementation to use internal type conversion adapters instead of explicit raw value assignments. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
LiveKitClient.podspec (1)
17-21: Typo: Extra leading space in version constraint.Line 21 has
" = 1.1.4"(with a leading space) while line 20 uses"= 1.1.4". This inconsistency may cause CocoaPods to fail dependency resolution.🔧 Proposed fix
- spec.dependency("OrderedCollections", " = 1.1.4") + spec.dependency("OrderedCollections", "= 1.1.4")
🧹 Nitpick comments (1)
Sources/LiveKit/Types/AudioDuckingLevel.swift (1)
26-33: Consider explicitly defining raw values for defensive API stability.While the current codebase doesn't rely on
rawValueorinit(rawValue:)(conversion uses case matching instead), explicitly assigning values protects against silent breaking changes if clients—or future SDK changes—rely on raw value persistence:Optional refactor to preserve explicit raw values
public enum AudioDuckingLevel: Int { - case `default` - case min - case mid - case max + case `default` = 0 + case min = 1 + case mid = 2 + case max = 3 }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.changes/other-audio-duckingDocs/audio.mdLiveKitClient.podspecPackage.swiftPackage@swift-6.0.swiftSources/LiveKit/Audio/Manager/AudioManager.swiftSources/LiveKit/Types/AudioDuckingLevel.swift
🧰 Additional context used
🧬 Code graph analysis (2)
Sources/LiveKit/Types/AudioDuckingLevel.swift (2)
Sources/LiveKit/Types/AudioSessionConfiguration.swift (1)
toRTCType(109-115)Sources/LiveKit/Types/SpeechActivityEvent.swift (1)
toLKType(25-31)
Sources/LiveKit/Audio/Manager/AudioManager.swift (3)
Sources/LiveKit/Types/AudioDuckingLevel.swift (2)
toLKType(48-56)toRTCType(37-44)Sources/LiveKit/Types/AudioEngineAvailability.swift (2)
toLKType(33-36)toRTCType(40-43)Sources/LiveKit/Audio/Manager/AudioManager+ModuleType.swift (1)
toRTCType(27-32)
🔇 Additional comments (9)
Package@swift-6.0.swift (1)
23-23: LGTM!The WebRTC dependency version bump to
137.7151.12is consistent with the PR objectives and aligns with the changes inPackage.swiftandLiveKitClient.podspec.Package.swift (1)
22-22: LGTM!The WebRTC dependency version bump to
137.7151.12is consistent across all package manifests.Docs/audio.md (1)
31-53: Well-documented feature addition.The documentation clearly explains:
- Apple's voice processing ducking behavior
- The SDK's conservative defaults (minimal ducking)
- Available controls with practical examples
The documented ducking levels (
.default,.min,.mid,.max) match the actualAudioDuckingLevelenum cases defined inSources/LiveKit/Types/AudioDuckingLevel.swift. This aligns well with the PR's goal to document the new default other-audio-ducking configuration..changes/other-audio-ducking (1)
1-1: Changelog fragment format is correct.The format
patch type="changed" "message"matches the expected syntax defined inscripts/create_version.swift. The entry will be properly processed to bump the patch version and added to the CHANGELOG under the "### Changed" section.Sources/LiveKit/Types/AudioDuckingLevel.swift (2)
17-24: Docs clearly define “other audio.”This clarification should help callers interpret ducking behavior correctly.
36-55: Adapter mapping is clean; please verify enum parity in the updated WebRTC bundle.The explicit case mapping avoids raw‑value coupling. Please double‑check that LiveKitWebRTC 137.7151.12 still defines
.default/.min/.mid/.maxso these conversions stay aligned.Sources/LiveKit/Audio/Manager/AudioManager.swift (3)
219-245: Docs make advanced vs fixed ducking behavior clear.The defaults and usage guidance are easy to follow.
248-249: Centralized conversion usage looks good.Using the adapter helpers here keeps the mapping consistent in one place.
315-315: Extra permission note is helpful.Nice clarification for developers integrating recording flows.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Updated lib to 137.7151.12 which includes patch webrtc-sdk/webrtc#212
Reference: https://developer.apple.com/videos/play/wwdc2023/10235/?time=197
Summary by CodeRabbit
Documentation
Changed
Chores
✏️ Tip: You can customize this high-level summary in your review settings.