Instance Property

availableModes

The audio session modes available on the device.

Declaration

var availableModes: [AVAudioSession.Mode] { get }

Discussion

Not every audio session mode is available on every device. For example, the videoRecording mode is unavailable on a device that doesn’t support video recording.

Query this property to determine if the mode you would like to use is available on the current device.

See Also

Configuring the Audio Session

var category: AVAudioSession.Category

The current audio session category.

func setCategory(AVAudioSession.Category)

Sets the current audio session category.

func setCategory(AVAudioSession.Category, options: AVAudioSession.CategoryOptions)

Sets the audio session category with the specified options.

var availableCategories: [AVAudioSession.Category]

The audio session categories available on the current device.

var categoryOptions: AVAudioSession.CategoryOptions

The mask of options associated with the current audio session category.

var mode: AVAudioSession.Mode

The current audio session mode.

func setMode(AVAudioSession.Mode)

Sets the audio session mode.