B面1.0.6蓝牙播放的优化
This commit is contained in:
parent
d3504cb6fc
commit
866318c73f
@ -47,7 +47,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
let session = AVAudioSession.sharedInstance()
|
||||
do {
|
||||
//允许后台活跃,播放以及记录
|
||||
try session.setCategory(.playAndRecord, mode: .default, options: [.allowAirPlay, .defaultToSpeaker])
|
||||
try session.setCategory(.playAndRecord, mode: .default, options: [.allowAirPlay, .defaultToSpeaker, .allowBluetooth])
|
||||
//激活会话
|
||||
try session.setActive(true)
|
||||
try session.overrideOutputAudioPort(.speaker)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user