Instance Method

audioPlayerEndInterruption(_:withOptions:)

Called after your audio session interruption ends, with options indicating the state of the audio session.

Declaration

optional func audioPlayerEndInterruption(_ player: AVAudioPlayer, withOptions flags: Int)

Parameters

player

The audio player whose interruption has ended.

flags

Options indicating the state of the audio session when this method is called. Options are described in AVAudioSessionInterruptionOptions.

Discussion

When an interruption ends, such as by a user ignoring an incoming phone call, the audio session for your application is automatically reactivated; at that point you can again interact with the audio player. To resume playback, call the play() method.

If this delegate method receives the AVAudioSessionInterruptionOptionShouldResume constant in its options parameter, the audio session is immediately ready to be used.

See Also

Handling Audio Interruptions

func audioPlayerBeginInterruption(AVAudioPlayer)

Called when an audio player is interrupted, such as by an incoming phone call.

Deprecated
func audioPlayerEndInterruption(AVAudioPlayer)

Called after your audio session interruption ends.

Deprecated
func audioPlayerEndInterruption(AVAudioPlayer, withFlags: Int)

Called after your audio session interruption ends, with flags indicating the state of the audio session.

Deprecated