fix: change audio mode back to .default — .moviePlayback breaks all playback on iOS 26
This commit is contained in:
parent
6f786cd1a8
commit
37d7338823
@ -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)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user