Are there any delegate methods in AVPlayer class? I need to handle interruptions such as phone call etc. AVAudioPlayer supports. If AVPlayer doesn’t support it, how to stream audio with AVAudioPlayer?
Are there any delegate methods in AVPlayer class? I need to handle interruptions such
Share
AVPlayerdoesn’t have the methods you want but you can useAVAudioSessionobject instead1) Select
AVAudioSessionobject (for example[AVAudioSession sharedInstance])2) Set it active by calling
setActive:error:method3) Set its delegate (class implementing
AVAudioSessionDelegateprotocol)4) Implement delegate’s methods such as