mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Don't use front microphone for videos too
This commit is contained in:
parent
e2d238a2aa
commit
aa02427070
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user