mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-03-25 09:05:52 +00:00
Fixed issue with Bluetooth audio being forced onto device
This commit is contained in:
parent
d837d4d71e
commit
6b8d19620c
1 changed files with 7 additions and 3 deletions
|
|
@ -1016,9 +1016,13 @@ open class SwiftyCamViewController: UIViewController {
|
|||
}
|
||||
|
||||
do{
|
||||
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
|
||||
with: [.duckOthers, .defaultToSpeaker])
|
||||
|
||||
if #available(iOS 10.0, *) {
|
||||
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
|
||||
with: [.mixWithOthers, .allowBluetooth, .allowAirPlay, .allowBluetoothA2DP])
|
||||
} else {
|
||||
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
|
||||
with: [.mixWithOthers, .allowBluetooth])
|
||||
}
|
||||
session.automaticallyConfiguresApplicationAudioSession = false
|
||||
}
|
||||
catch {
|
||||
|
|
|
|||
Loading…
Reference in a new issue