Don't use front microphone for videos too

This commit is contained in:
Ilya Laktyushin 2024-02-02 19:34:34 +04:00
parent e2d238a2aa
commit aa02427070

View File

@ -960,17 +960,6 @@ public final class ManagedAudioSession: NSObject {
try AVAudioSession.sharedInstance().overrideOutputAudioPort(.none)
}
if case let .record(_, video, _) = type, video, let input = AVAudioSession.sharedInstance().availableInputs?.first {
if let dataSources = input.dataSources {
for source in dataSources {
if source.dataSourceName.contains("Front") {
try? input.setPreferredDataSource(source)
break
}
}
}
}
if resetToBuiltin {
var updatedType = type
if case .record(false, let video, let withOthers) = updatedType, self.isHeadsetPluggedInValue {