Static AVAudioSessionInterruptionNotification

Source
pub unsafe static AVAudioSessionInterruptionNotification: &'static NSNotificationName
Available on crate feature AVAudioSession only.
Expand description

Notification sent to registered listeners when the system has interrupted the audio session and when the interruption has ended.

Check the notification’s userInfo dictionary for the interruption type, which is either Begin or End. In the case of an end interruption notification, check the userInfo dictionary for AVAudioSessionInterruptionOptions that indicate whether audio playback should resume. In the case of a begin interruption notification, the reason for the interruption can be found within the info dictionary under the key AVAudioSessionInterruptionReasonKey.

See also Apple’s documentation