Allow Haptic Feedback and System Sounds while recording

This commit is contained in:
Marc Rousavy
2021-03-26 15:58:08 +01:00
parent 750af31a80
commit 8066f3fb53
3 changed files with 29 additions and 1 deletions

View File

@@ -293,6 +293,7 @@ final class CameraView: UIView {
// allow background music playback
try audioSession.setCategory(AVAudioSession.Category.playAndRecord, options: [.mixWithOthers, .allowBluetoothA2DP, .defaultToSpeaker])
}
audioSession.trySetAllowHaptics(true)
// activate current audio session because camera is active
try audioSession.setActive(true)
} catch let error as NSError {