Skip to content

Commit 6e203d0

Browse files
committed
fix seektime tolerance
1 parent 737d348 commit 6e203d0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ios/RCTVideo.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,11 @@ - (void)setSeek:(float)seekTime
561561
CMTime cmSeekTime = CMTimeMakeWithSeconds(seekTime, timeScale);
562562
CMTime current = item.currentTime;
563563
// TODO figure out a good tolerance level
564-
CMTime tolerance = CMTimeMake(1000, timeScale);
565564
BOOL wasPaused = _paused;
566565

567566
if (CMTimeCompare(current, cmSeekTime) != 0) {
568567
if (!wasPaused) [_player pause];
569-
[_player seekToTime:cmSeekTime toleranceBefore:tolerance toleranceAfter:tolerance completionHandler:^(BOOL finished) {
568+
[_player seekToTime:cmSeekTime toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero completionHandler:^(BOOL finished) {
570569
if (!wasPaused) [_player play];
571570
if(self.onVideoSeek) {
572571
self.onVideoSeek(@{@"currentTime": [NSNumber numberWithFloat:CMTimeGetSeconds(item.currentTime)],

0 commit comments

Comments
 (0)