interruptionNotification
A notification the system posts when an audio interruption occurs.
Declaration
class let interruptionNotification: NSNotification.NameMentioned in
Discussion
The notification’s user-information dictionary contains the AVAudioSessionInterruptionTypeKey key. If the interruption type is AVAudioSession.InterruptionType.began, the system interrupted your app’s audio session and it’s no longer active. If the interruption type is AVAudioSession.InterruptionType.ended, this dictionary also contains the AVAudioSessionInterruptionOptionKey key.
See Handling audio interruptions for more information on using this notification.
The system posts this notification on the main thread.
Topics
User Info Keys
AVAudioSessionInterruptionTypeKeyAVAudioSessionInterruptionOptionKeyAVAudioSessionInterruptionReasonKeyAVAudioSessionInterruptionWasSuspendedKey