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

# seek(to:toleranceBefore:toleranceAfter:)

Sets the current playback time within a specified time bound.

```
func seek(to time: CMTime, toleranceBefore: CMTime, toleranceAfter: CMTime)
```

## Parameters

`time`

The time to which you would like to move the playback cursor.

`toleranceBefore`

The tolerance allowed before `time`.

`toleranceAfter`

The tolerance allowed after `time`.

## Discussion

The time seeked to will be within the range `[time-beforeTolerance, time+afterTolerance]`, and may differ from the specified time for efficiency. If you pass `kCMTimeZero` for both `toleranceBefore` and `toleranceAfter` (to request sample accurate seeking), you may incur additional decoding delay that impacts seeking performance.

Passing `kCMTimePositiveInfinity` for both `toleranceBefore` and `toleranceAfter` is the same as messaging [`seek(to:)`](/documentation/AVFoundation/AVPlayerItem/seek(to:)-1dpto) directly.

## See Also

[`seek(to:toleranceBefore:toleranceAfter:completionHandler:)`](/documentation/AVFoundation/AVPlayerItem/seek(to:toleranceBefore:toleranceAfter:completionHandler:))

Sets the current playback time within a specified time bound and invokes the specified block when the seek operation completes or is interrupted.

[`seek(to:completionHandler:)`](/documentation/AVFoundation/AVPlayerItem/seek(to:completionHandler:)-91gnw)

Sets the current playback time to the specified time.



---

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)