Don't set audio to ambient while other audioActivity exists

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent c2501d8d1e
commit 4e64b09ad6

@ -40,6 +40,12 @@ public class OWSAudioSession: NSObject {
startAudioActivity(audioActivity)
guard currentActivities.count == 0 else {
// We don't want to clobber the audio capabilities configured by (e.g.) media playback or an in-progress call
Logger.info("\(logTag) in \(#function) not touching audio session since another currentActivity exists.")
return
}
do {
try avAudioSession.setCategory(AVAudioSessionCategoryAmbient)
} catch {

Loading…
Cancel
Save