AudioManager class

Controls LiveKit's process-wide platform audio behavior.

Platform audio sessions and the audio processing module are global to the app process, so session options and engine-scoped audio state live here rather than on a Room or an individual track.

Properties

audioEngineState → AudioEngineState
The current audio engine state, derived from native engine lifecycle events (iOS/macOS). On platforms without engine events this stays idle.
no setter
audioEngineStateStream → Stream<AudioEngineState>
A broadcast stream of audio engine state changes (native engine lifecycle).
no setter
canSwitchSpeakerphone → bool
Whether the platform supports switching the speaker output (iOS/Android).
no setter
hashCode → int
The hash code for this object.
no setterinherited
isSpeakerOutputForced → bool
Whether speaker output is forced even when a headset/Bluetooth device is connected.
no setter
isSpeakerOutputPreferred → bool
Whether the speaker is the preferred audio output.
no setter
managementMode → AudioSessionManagementMode
no setter
options → AudioSessionOptions
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

deactivateAudioSession() → Future<void>
Deactivates the current platform audio session and switches to manual mode.
getAudioProcessingState() → Future<AudioProcessingState?>
Diagnostic snapshot of the resolved audio processing state.
getMicrophoneMuteMode() → Future<MicrophoneMuteMode>
How microphone input is muted on iOS/macOS.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetForTest() → void
setAudioSessionManagementMode(AudioSessionManagementMode mode) → Future<void>
Selects whether LiveKit manages the platform audio session automatically.
setAudioSessionOptions(AudioSessionOptions options) → Future<void>
Applies an explicit audio session configuration and switches to manual mode.
setEngineAvailability(AudioEngineAvailability availability) → Future<void>
Sets whether the WebRTC audio engine is allowed to run.
setMicrophoneMuteMode(MicrophoneMuteMode mode) → Future<void>
Sets how microphone input is muted on iOS/macOS. No-op elsewhere, including for MicrophoneMuteMode.unknown, so setMicrophoneMuteMode(await getMicrophoneMuteMode()) round-trips safely on every platform.
setSpeakerOutputPreferred(bool preferred, {bool force = false}) → Future<void>
Prefers routing audio output to/from the speaker.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → AudioManager
final