I'm having trouble with UISlider
and AVPlayer
scrubbing method. Every time the method is invoked the player restarts from 0. I tried debugging and seems that the slider value is right but when I Step Over, it's set 0, thus the player restarts. This is what I've tried:
var desiredTime = CMTimeMake(Int64(self.progressSlider.value), 1)
AudioManager.sharedInstance.audioPlayer.seekToTime(desiredTime)
I've also tried looking at similar questions and found that it was the same when I tried their solutions.
I appreciate your help.