Skip to content

Commit

Permalink
refactor(appleavplayer): use accurate seek when seek pos >= duration
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Sep 18, 2020
1 parent 2377863 commit a02ac46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mediaPlayer/externalPlayer/AppleAVPlayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@
playerHandler.isSeeking = false;
}
};
if (seekPos >= GetDuration()){
bAccurate = true;
}
[player.currentItem cancelPendingSeeks];
if (bAccurate) {
[player seekToTime:CMTimeMakeWithSeconds(seconds, 1)toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero completionHandler:completionHandler];
Expand Down

0 comments on commit a02ac46

Please sign in to comment.