From 37d7338823599a983e6bc2f9195bf7c06fb85d8f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 2 Jul 2026 22:41:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20change=20audio=20mode=20back=20to=20.def?= =?UTF-8?q?ault=20=E2=80=94=20.moviePlayback=20breaks=20all=20playback=20o?= =?UTF-8?q?n=20iOS=2026?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/PlayerBridge.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/PlayerBridge.swift b/Sources/PlayerBridge.swift index 203d060..94cd570 100644 --- a/Sources/PlayerBridge.swift +++ b/Sources/PlayerBridge.swift @@ -166,12 +166,11 @@ final class PlayerBridge: ObservableObject { private func configureAudioSession() { do { let session = AVAudioSession.sharedInstance() - // .moviePlayback 优化视频影音同步,同时兼容纯音频 - try session.setCategory(.playback, mode: .moviePlayback) + try session.setCategory(.playback, mode: .default) try session.setActive(true) let route = session.currentRoute let outputs = route.outputs.map { "\($0.portName)(\($0.portType.rawValue))" }.joined(separator: ", ") - NSLog("[MiniPlayer] AVAudioSession configured: playback+moviePlayback, outputs=[%@]", outputs) + NSLog("[MiniPlayer] AVAudioSession configured: playback, outputs=[%@]", outputs) } catch { NSLog("[MiniPlayer] AVAudioSession setup failed: %@", error.localizedDescription) }