We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb07e37 + 01f42fe commit e0e4e8bCopy full SHA for e0e4e8b
ios/TextToSpeech/TextToSpeech.m
@@ -79,7 +79,13 @@ + (BOOL)requiresMainQueueSetup
79
}
80
81
if([_ignoreSilentSwitch isEqualToString:@"ignore"]) {
82
- [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
+ [[AVAudioSession sharedInstance]
83
+ setCategory:AVAudioSessionCategoryPlayback
84
+ mode:AVAudioSessionModeVoicePrompt
85
+ // This will pause a spoken audio like podcast or audiobook and duck the volume for music
86
+ options:AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers
87
+ error:nil
88
+ ];
89
} else if([_ignoreSilentSwitch isEqualToString:@"obey"]) {
90
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
91
0 commit comments