Instance Method

audioPlayerEndInterruption(_:withFlags:)

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

Declaration

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

Parameters

player

The audio player whose interruption has ended.

flags

Flags indicating the state of the audio session when this method is called. Flags are described in Interruption Flags.

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 AVAudioSessionInterruptionFlags_ShouldResume constant in its flags parameter, the audio session is immediately ready to be used.

If you implement this method, the system does not call the audioPlayerEndInterruption(_:) method.

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, withOptions: Int)

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

Deprecated
func audioPlayerEndInterruption(AVAudioPlayer)

Called after your audio session interruption ends.

Deprecated