Global Variable

AVAudioSessionRouteChangeNotification

Posted when the system’s audio route changes.

Declaration

const NSNotificationName AVAudioSessionRouteChangeNotification;

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

AVAudioSessionRouteChangeReasonKey

User info key to retrieve the route change reason.

AVAudioSessionRouteChangePreviousRouteKey

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

User Info Values

AVAudioSessionRouteChangeReason

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.

AVAudioSessionInterruptionNotification

Posted when an audio interruption occurs.

AVAudioSessionSilenceSecondaryAudioHintNotification

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

AVAudioSessionMediaServicesWereLostNotification

Posted when the media server is terminated.

AVAudioSessionMediaServicesWereResetNotification

Posted when the media server restarts.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software