<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayer/seek(to:toleranceBefore:toleranceAfter:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayer(im)seekToTime:toleranceBefore:toleranceAfter:completionHandler:"
  },
  "title" : "seek(to:toleranceBefore:toleranceAfter:completionHandler:)"
}
-->

# seek(to:toleranceBefore:toleranceAfter:completionHandler:)

Requests that the player seek to a specified time with the amount of accuracy specified by the time tolerance values, and to notify you when the seek is complete.

```
nonisolated func seek(to time: CMTime, toleranceBefore: CMTime, toleranceAfter: CMTime, completionHandler: @escaping @Sendable (Bool) -> Void)
```

## Parameters

`time`

The time to which to seek.

`toleranceBefore`

The tolerance allowed before `time`.

`toleranceAfter`

The tolerance allowed after `time`.

`completionHandler`

The block to invoke when the seek operation has either been completed or been interrupted.

    The block takes one argument:

- finished: Indicated whether the seek operation completed.

## Discussion

Use this method to seek to a specified time for the current player item and to be notified when the seek operation is complete.

The time seeked to will be within the range `[time-beforeTolerance, time+afterTolerance]`, and may differ from the specified time for efficiency. You can request sample accurate seeking by passing a time value of`kCMTimeZero` for both `toleranceBefore` and `toleranceAfter`. Sample accurate seeking may incur additional decoding delay which can impact seeking performance.

Invoking this method with `toleranceBefore` set to <doc://com.apple.documentation/documentation/CoreMedia/CMTime/positiveInfinity> and `toleranceAfter` set to <doc://com.apple.documentation/documentation/CoreMedia/CMTime/positiveInfinity> is the same as invoking [`seek(to:)`](/documentation/AVFoundation/AVPlayer/seek(to:)-87h2r).

The completion handler for any prior seek request that is still in process will be invoked immediately with the `finished` parameter set to <doc://com.apple.documentation/documentation/Swift/false>. If the new request completes without being interrupted by another seek request or by any other operation the specified completion handler will be invoked with the `finished` parameter set to <doc://com.apple.documentation/documentation/Swift/true>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)