修复静音没有声音bug

(cherry picked from commit c6f05b73a1805f1566ca99f1e70b6fb873655f98)
This commit is contained in:
zeng 2025-04-27 17:07:22 +08:00
parent c845ecb41d
commit 351d7d8262

View File

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