修复静音没有声音bug

This commit is contained in:
zeng 2025-04-27 17:07:22 +08:00
parent f87d98c703
commit c6f05b73a1

View File

@ -257,6 +257,16 @@ extension SPPlayer {
self.delegate?.sp_playCompletion?(self)
}
}
player.playerReadyToPlay = { (asset, assetURL) in
do {
try AVAudioSession.sharedInstance().setCategory(.playback)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
}
}
}
}