setAudioSessionOptions method
- AudioSessionOptions options
Applies an explicit audio session configuration and switches to manual mode.
Calling this puts AudioManager in AudioSessionManagementMode.manual: LiveKit stops managing the session from room, connect, and engine lifecycle, and the app owns it from here. Hand control back to LiveKit with setAudioSessionManagementMode and AudioSessionManagementMode.automatic.
The speaker preference and force flag are owned by setSpeakerOutputPreferred and are preserved across this call.
Implementation
Future<void> setAudioSessionOptions(AudioSessionOptions options) async {
await _enterManualMode();
_options = options;
await _applyCurrentAudioSessionPolicy();
}