dimitris-c / AudioStreaming

An AudioPlayer/Streaming library for iOS written in Swift using AVAudioEngine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audio doesn't restart after phone call and doesn't stop when disconnecting audio devices

federicochiesa opened this issue · comments

As the title says, it seems like the audio player ignores system events like disconnecting headphones/CarPlay and keeps playing when it should stop, and if a phone call is received or made while audio is playing, playback doesn't resume after the call is done.

Am i missing something? Is this intended behavior?

This is something that you need to implement according to your application's needs.
You can read how to handle these types of interruptions here https://developer.apple.com/documentation/avfaudio/avaudiosession/responding_to_audio_session_interruptions?changes=__6