Instance Method

seekToTime:toleranceBefore:toleranceAfter:

Sets the current playback time within a specified time bound.

Declaration

- (void)seekToTime:(CMTime)time toleranceBefore:(CMTime)toleranceBefore toleranceAfter:(CMTime)toleranceAfter;

Parameters

time

The time to which to seek.

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. You can request sample accurate seeking by passing a time value ofkCMTimeZero for both toleranceBefore and toleranceAfter. Sample accurate seeking may incur additional decoding delay which can impact seeking performance.

Passing kCMTimePositiveInfinity for both toleranceBefore and toleranceAfter is the same as messaging seekToTime: directly.

See Also

Managing Time

- currentTime

Returns the current time of the current player item.

- seekToTime:

Sets the current playback time to the specified time.

- seekToDate:

Sets the current playback time to the time specified by the date object.

- seekToTime:completionHandler:

Sets the current playback time to the specified time and executes the specified block when the seek operation completes or is interrupted.

- seekToDate:completionHandler:

Sets the current playback time to the specified time and executes the specified block when the seek operation completes or is interrupted.

- seekToTime: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.