Cases that indicate the possible route-sharing policies for an audio session.


enum RouteSharingPolicy : UInt


A route-sharing policy allows you to specify that an audio session should route its output to somewhere other than the default system output when alternative routes are available.


Route-Sharing Policies

case `default`

A policy that follows standard rules for routing audio output.

case longFormAudio

A policy that routes output to the shared long-form audio output.

case longFormVideo

A policy that routes output to the shared long-form video output.

case independent

A policy in which the route picker UI directs videos to a wireless route.

static var longForm: AVAudioSession.RouteSharingPolicy

A policy that routes output to the shared long-form audio output.


See Also

Configuring the Audio Session

var category: AVAudioSession.Category

The current audio session category.

func setCategory(AVAudioSession.Category)

Sets the audio session’s category.

var availableCategories: [AVAudioSession.Category]

The audio session categories available on the current device.

struct AVAudioSession.Category

Audio session category identifiers.

var categoryOptions: AVAudioSession.CategoryOptions

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

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

Sets the audio session’s category with the specified options.

struct AVAudioSession.CategoryOptions

Constants that specify optional audio behaviors.

var mode: AVAudioSession.Mode

The current audio session’s mode.

func setMode(AVAudioSession.Mode)

Sets the audio session’s mode.

var availableModes: [AVAudioSession.Mode]

The audio session modes available on the device.

struct AVAudioSession.Mode

Audio session mode identifiers.