Extract AVCaptureSession and AVAudioSession setup to extensions

This commit is contained in:
Marc Rousavy
2021-03-26 16:20:57 +01:00
parent 56c67f25c7
commit 9404b93dc3
8 changed files with 359 additions and 321 deletions

View File

@@ -15,8 +15,8 @@ extension AVAudioSession {
*/
func trySetAllowHaptics(_ allowHaptics: Bool) {
if #available(iOS 13.0, *) {
if !audioSession.allowHapticsAndSystemSoundsDuringRecording {
try? audioSession.setAllowHapticsAndSystemSoundsDuringRecording(true)
if !self.allowHapticsAndSystemSoundsDuringRecording {
try? self.setAllowHapticsAndSystemSoundsDuringRecording(true)
}
}
}