mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix audio session setup for camera
This commit is contained in:
parent
c38c6827d6
commit
b91019c56e
@ -778,21 +778,21 @@ public final class ManagedAudioSession: NSObject {
|
|||||||
options.insert(.allowBluetooth)
|
options.insert(.allowBluetooth)
|
||||||
options.insert(.allowBluetoothA2DP)
|
options.insert(.allowBluetoothA2DP)
|
||||||
options.insert(.mixWithOthers)
|
options.insert(.mixWithOthers)
|
||||||
case .record, .recordWithOthers:
|
case .record:
|
||||||
options.insert(.allowBluetooth)
|
options.insert(.allowBluetooth)
|
||||||
|
case .recordWithOthers:
|
||||||
|
options.insert(.allowBluetoothA2DP)
|
||||||
|
options.insert(.mixWithOthers)
|
||||||
}
|
}
|
||||||
managedAudioSessionLog("ManagedAudioSession setting category and options")
|
managedAudioSessionLog("ManagedAudioSession setting category and options")
|
||||||
let mode: AVAudioSession.Mode
|
let mode: AVAudioSession.Mode
|
||||||
switch type {
|
switch type {
|
||||||
case .voiceCall:
|
case .voiceCall:
|
||||||
mode = .voiceChat
|
mode = .voiceChat
|
||||||
options.insert(.mixWithOthers)
|
|
||||||
case .videoCall:
|
case .videoCall:
|
||||||
mode = .videoChat
|
mode = .videoChat
|
||||||
options.insert(.mixWithOthers)
|
|
||||||
case .recordWithOthers:
|
case .recordWithOthers:
|
||||||
mode = .videoRecording
|
mode = .videoRecording
|
||||||
options.insert(.mixWithOthers)
|
|
||||||
default:
|
default:
|
||||||
mode = .default
|
mode = .default
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user