IosOptions

data class IosOptions(val manageAudioSession: Boolean = true, val category: IosSessionCategory = IosSessionCategory.PlayAndRecord, val mode: IosSessionMode = IosSessionMode.Default, val bluetoothInput: IosBluetoothInput = IosBluetoothInput.Off, val mixWithOthers: Boolean = false, val defaultToSpeaker: Boolean = true, val deactivateOnPause: Boolean = false)(source)

Constructors

Link copied to clipboard
constructor(manageAudioSession: Boolean = true, category: IosSessionCategory = IosSessionCategory.PlayAndRecord, mode: IosSessionMode = IosSessionMode.Default, bluetoothInput: IosBluetoothInput = IosBluetoothInput.Off, mixWithOthers: Boolean = false, defaultToSpeaker: Boolean = true, deactivateOnPause: Boolean = false)

Properties

Link copied to clipboard

Whether a Bluetooth headset may be the microphone. Off by default: recording through IosBluetoothInput.Hfp switches the headset to its call profile (8–16 kHz) for all audio on the device while the session is active.

Link copied to clipboard
Link copied to clipboard

Deactivate the audio session on CaptureSession.pause so other apps' audio can resume. Off by default: deactivating also stops your own app's playback, and reactivating makes CaptureSession.resume take about half a second. The microphone is released either way.

Link copied to clipboard

Route output to the speaker rather than the receiver. IosSessionCategory.PlayAndRecord only.

Link copied to clipboard

Let the library configure and activate AVAudioSession for each session and deactivate it afterwards. Turn off if your app manages the audio session itself; the category must then allow recording before AudioCapture.start.

Link copied to clipboard

Keep other apps' audio playing. IosSessionCategory.PlayAndRecord only.

Link copied to clipboard