dimitris-c / AudioStreaming

An AudioPlayer/Streaming library for iOS written in Swift using AVAudioEngine.
MIT License
266 stars 56 forks source link

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

Closed federicochiesa closed 2 years ago

federicochiesa commented 2 years ago

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?

dimitris-c commented 2 years ago

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