Im having a problem with seeking with AVPlayer.seekToTime, I have the time index that I want to seek to inside a scrollViewDidScroll method like this:
func scrollViewDidScroll(scrollView: UIScrollView) {
let offsetTime = scrollView.contentOffset.y * 0.1
self.playerController.player?.seekToTime(CMTime(seconds: Double(offsetTime), preferredTimescale: 10), toleranceBefore: kCMTimePositiveInfinity, toleranceAfter: kCMTimeZero)
}
But the video does not flow nice. For example, when you scroll I want the video to only to move forward like 0.01 of a second (the video I have is real short only about 2.0 sec long) but when you scroll far enough, instead the video moves forward almost a whole second. Its really choppy and I'm not sure why I can't seek to like say 1.00 seconds to 1.01 seconds and have the image representing the time index on the player move. Is this possible? What am I doing wrong? Please help!
PS: I never call self.playerController.player?.play() if this helps