From b91019c56ea5f8f6ee191c5ef729cb7bc5e3205e Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 28 Jun 2023 10:42:42 +0200 Subject: [PATCH] Fix audio session setup for camera --- .../TelegramAudio/Sources/ManagedAudioSession.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramAudio/Sources/ManagedAudioSession.swift b/submodules/TelegramAudio/Sources/ManagedAudioSession.swift index ea5c8f4765..31a2bd5c58 100644 --- a/submodules/TelegramAudio/Sources/ManagedAudioSession.swift +++ b/submodules/TelegramAudio/Sources/ManagedAudioSession.swift @@ -778,21 +778,21 @@ public final class ManagedAudioSession: NSObject { options.insert(.allowBluetooth) options.insert(.allowBluetoothA2DP) options.insert(.mixWithOthers) - case .record, .recordWithOthers: + case .record: options.insert(.allowBluetooth) + case .recordWithOthers: + options.insert(.allowBluetoothA2DP) + options.insert(.mixWithOthers) } managedAudioSessionLog("ManagedAudioSession setting category and options") let mode: AVAudioSession.Mode switch type { case .voiceCall: mode = .voiceChat - options.insert(.mixWithOthers) case .videoCall: mode = .videoChat - options.insert(.mixWithOthers) case .recordWithOthers: mode = .videoRecording - options.insert(.mixWithOthers) default: mode = .default }