|
|
@ -113,7 +113,7 @@ public class MusicService: NSObject { |
|
|
let audioSession = AVAudioSession.sharedInstance() |
|
|
let audioSession = AVAudioSession.sharedInstance() |
|
|
|
|
|
|
|
|
// 使用更简单的配置,避免参数冲突 |
|
|
// 使用更简单的配置,避免参数冲突 |
|
|
try audioSession.setCategory(.playback, mode: .default, options: [.mixWithOthers]) |
|
|
try audioSession.setCategory(.playback, mode: .default, options: [.allowAirPlay, .allowBluetooth, .allowBluetoothA2DP]) |
|
|
print("🎵 [MusicService] ✅ 音频会话类别设置成功") |
|
|
print("🎵 [MusicService] ✅ 音频会话类别设置成功") |
|
|
|
|
|
|
|
|
// 延迟激活音频会话,避免与其他服务冲突 |
|
|
// 延迟激活音频会话,避免与其他服务冲突 |
|
|
|