readium / swift-toolkit

A toolkit for ebooks, audiobooks and comics written in Swift
https://readium.org/mobile/
BSD 3-Clause "New" or "Revised" License
223 stars 96 forks source link

Adjust the audio session strategy for the `AudioNavigator` #357

Closed mickael-menu closed 7 months ago

mickael-menu commented 7 months ago

spokenAudio is better suited for the AudioSession mode, as it will interrupt the audiobook playback when a spoken notification is triggered.

Appropriate for applications which play spoken audio and wish to be paused (via audio session interruption) rather than ducked if another app (such as a navigation app) plays a spoken audio prompt. Examples of apps that would use this are podcast players and audio books. For more information, see the related category option AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers.