mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-04-27 15:07:43 +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{
|
do{
|
||||||
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
|
if #available(iOS 10.0, *) {
|
||||||
with: [.duckOthers, .defaultToSpeaker])
|
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
|
||||||
|
with: [.mixWithOthers, .allowBluetooth, .allowAirPlay, .allowBluetoothA2DP])
|
||||||
|
} else {
|
||||||
|
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
|
||||||
|
with: [.mixWithOthers, .allowBluetooth])
|
||||||
|
}
|
||||||
session.automaticallyConfiguresApplicationAudioSession = false
|
session.automaticallyConfiguresApplicationAudioSession = false
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue