Skip to content

Export native audio configuration types from public API#1022

Open
spydon wants to merge 2 commits intolivekit:mainfrom
spydon:export-native-audio-types
Open

Export native audio configuration types from public API#1022
spydon wants to merge 2 commits intolivekit:mainfrom
spydon:export-native-audio-types

Conversation

@spydon
Copy link
Contributor

@spydon spydon commented Mar 5, 2026

Summary

The onConfigureNativeAudio callback is the intended way to customize iOS/Android audio session configuration, but the types needed to use it (NativeAudioConfiguration, AppleAudioCategory, AppleAudioCategoryOption, AppleAudioMode, AudioTrackState, etc.) are not exported from the public API.

This forces consumers to import from src/ paths, triggering implementation_imports lint warnings.

This PR adds two exports to livekit_client.dart:

  • src/support/native_audio.dartNativeAudioConfiguration, AppleAudioCategory, AppleAudioCategoryOption, AppleAudioMode and their extensions
  • src/track/audio_management.dartAudioTrackState, ConfigureNativeAudioFunc, NativeAudioManagement, audioTrackState, onConfigureNativeAudio (internal mixins are excluded via show)

Use case

We need to configure the iOS audio session with mixWithOthers + voiceChat mode for our voice AI app. The only way to do this is via onConfigureNativeAudio, which requires these types.

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