From 5d7ec7d3d30842b0bc9bdc0cecba2ce0759bee61 Mon Sep 17 00:00:00 2001 From: najeira Date: Wed, 22 Aug 2018 19:16:53 +0900 Subject: [PATCH] fix: frame accurate seekTo on iOS https://github.com/flutter/plugins/pull/622 --- ios/Classes/VideoPlayerPlugin.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Classes/VideoPlayerPlugin.m b/ios/Classes/VideoPlayerPlugin.m index 508c338..650f866 100755 --- a/ios/Classes/VideoPlayerPlugin.m +++ b/ios/Classes/VideoPlayerPlugin.m @@ -207,7 +207,9 @@ - (int64_t)duration { } - (void)seekTo:(int)location { - [_player seekToTime:CMTimeMake(location, 1000)]; + [_player seekToTime:CMTimeMake(location, 1000) + toleranceBefore:kCMTimeZero + toleranceAfter:kCMTimeZero]; } - (void)setIsLooping:(bool)isLooping {