Skip to content

Commit

Permalink
Validations of the values to assign in the seekbar were added due to …
Browse files Browse the repository at this point in the history
…the fact that in iOS 10 there was a crash due to NaN values.
  • Loading branch information
selvinn committed Mar 29, 2021
1 parent 0f0174a commit d519e89
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ open class VersaPlayerControls: View {
}

public func setSeekbarSlider(start startValue: Double, end endValue: Double, at time: Double) {
let time = time.isNaN ? 0 : time
let startValue = startValue.isNaN ? 0 : startValue
let endValue = endValue.isNaN ? 0 : endValue

#if os(macOS)
seekbarSlider?.minValue = startValue
seekbarSlider?.maxValue = endValue
Expand Down

0 comments on commit d519e89

Please sign in to comment.