Instance Property


The current audio session category.


var category: AVAudioSession.Category { get }


An audio session category defines a set of audio behaviors for your app. The supported category values are described in Audio Session Categories.

The default category assigned to an audio session is soloAmbient.

See Also

Configuring the Audio Session

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.

var availableModes: [AVAudioSession.Mode]

The audio session modes available on the device.