Type Property

routeChangeNotification

Posted when the system’s audio route changes.

Declaration

class let routeChangeNotification: NSNotification.Name

Discussion

The userInfo dictionary of this notification contains the AVAudioSessionRouteChangeReasonKey and AVAudioSessionRouteChangePreviousRouteKey keys, which provide information about the route change.

See Responding to Route Changes in Media Playback Programming Guide for more information on using this notification.

This notification is posted on a secondary thread.

Topics

User Info Keys

let AVAudioSessionRouteChangeReasonKey: String

User info key to retrieve the route change reason.

let AVAudioSessionRouteChangePreviousRouteKey: String

User info key to retrieve the previously active audio session route.

User Info Values

enum AVAudioSession.RouteChangeReason

Constants values indicating the reason for an audio route change.

See Also

Responding to Audio Session Notifications

Responding to Audio Session Interruptions

Directly observe audio session notifications to ensure that your app responds to interruptions.

Responding to Audio Session Route Changes

Directly observe audio session notifications to ensure that your app responds to interruptions.

class let interruptionNotification: NSNotification.Name

Posted when an audio interruption occurs.

class let silenceSecondaryAudioHintNotification: NSNotification.Name

Posted when the primary audio from other applications starts and stops.

class let mediaServicesWereLostNotification: NSNotification.Name

Posted when the media server is terminated.