ak1394 / react-native-tts

React Native Text-To-Speech library for Android and iOS
601 stars 154 forks source link

fix: pause spoken audio like podcast or audiobook #267

Closed fnazarios closed 3 weeks ago

fnazarios commented 3 weeks ago

This PR fixes the spoken audio on iOS. If the user is listening to a spoken audio like a podcast or audiobook, the TTS should pause the other audio session and duck if a user is listening to music.

https://developer.apple.com/documentation/avfaudio/avaudiosessioncategoryoptions/avaudiosessioncategoryoptioninterruptspokenaudioandmixwithothers?language=objc