From 1551807b38e5c03919012934c05fd5dd1ea7c87e Mon Sep 17 00:00:00 2001 From: "Mr.zhou" <1422157428@qq.com> Date: Tue, 11 Jun 2024 14:49:39 +0800 Subject: [PATCH] =?UTF-8?q?B=E9=9D=A2=E8=93=9D=E7=89=99=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E9=9F=B3=E9=A2=91=E8=B4=A8=E9=87=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- relax.offline.mp3.music/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relax.offline.mp3.music/AppDelegate.swift b/relax.offline.mp3.music/AppDelegate.swift index b20476f..4b48d6d 100644 --- a/relax.offline.mp3.music/AppDelegate.swift +++ b/relax.offline.mp3.music/AppDelegate.swift @@ -47,7 +47,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let session = AVAudioSession.sharedInstance() do { //允许后台活跃,播放以及记录 - try session.setCategory(.playAndRecord, mode: .default, options: [.allowBluetooth, .defaultToSpeaker]) + try session.setCategory(.playAndRecord,mode: .default, options: [.mixWithOthers, .allowAirPlay, .allowBluetoothA2DP,.defaultToSpeaker]) //激活会话 try session.setActive(true) // try session.overrideOutputAudioPort(.speaker)