Skip to content

Commit

Permalink
added nil checker for hold speed
Browse files Browse the repository at this point in the history
  • Loading branch information
cranci1 committed Jan 31, 2025
1 parent f5de72c commit 586e973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sora/MediaPlayer/NormalPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NormalPlayer: AVPlayerViewController {
guard let player = player else { return }
originalRate = player.rate
let holdSpeed = UserDefaults.standard.float(forKey: "holdSpeedPlayer")
player.rate = holdSpeed
player.rate = holdSpeed > 0 ? holdSpeed : 2.0
}

private func endHoldSpeed() {
Expand Down

0 comments on commit 586e973

Please sign in to comment.