編輯

共用方式為


AVPlayer.Seek Method

Definition

Overloads

Seek(CMTime, CMTime, CMTime, AVCompletion)

Seeks to a specific location in the playback stream.

Seek(NSDate, AVCompletion)

Seeks to a specific time in the playback stream and invokes the onComplete handler.

Seek(CMTime, CMTime, CMTime)

Blocking: Seeks to a specific location in the playback stream.

Seek(NSDate)

Seeks to a specific location in the playback stream.

Seek(CMTime, AVCompletion)

Seeks to a specific time in the playback stream and invokes the completion handler.

Seek(CMTime)

Seeks to a specific location in the playback stream.

Seek(CMTime, CMTime, CMTime, AVCompletion)

Seeks to a specific location in the playback stream.

[Foundation.Export("seekToTime:toleranceBefore:toleranceAfter:completionHandler:")]
public virtual void Seek (CoreMedia.CMTime time, CoreMedia.CMTime toleranceBefore, CoreMedia.CMTime toleranceAfter, AVFoundation.AVCompletion completion);
abstract member Seek : CoreMedia.CMTime * CoreMedia.CMTime * CoreMedia.CMTime * AVFoundation.AVCompletion -> unit
override this.Seek : CoreMedia.CMTime * CoreMedia.CMTime * CoreMedia.CMTime * AVFoundation.AVCompletion -> unit

Parameters

time
CMTime

Seek time target.

toleranceBefore
CMTime

Time tolerance allowed before the time.

toleranceAfter
CMTime

Time tolerance allowed after the time.

completion
AVCompletion

Method to invoke when the seek operation completes.

Attributes

Remarks

If the tolerance is zero, then the player might need to perform more work before completing.

Applies to

Seek(NSDate, AVCompletion)

Seeks to a specific time in the playback stream and invokes the onComplete handler.

[Foundation.Export("seekToDate:completionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 9, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void Seek (Foundation.NSDate date, AVFoundation.AVCompletion onComplete);
abstract member Seek : Foundation.NSDate * AVFoundation.AVCompletion -> unit
override this.Seek : Foundation.NSDate * AVFoundation.AVCompletion -> unit

Parameters

date
NSDate

Target data to seek to

onComplete
AVCompletion

Method to invoke when the seek operation completes.

Attributes

Applies to

Seek(CMTime, CMTime, CMTime)

Blocking: Seeks to a specific location in the playback stream.

[Foundation.Export("seekToTime:toleranceBefore:toleranceAfter:")]
public virtual void Seek (CoreMedia.CMTime toTime, CoreMedia.CMTime toleranceBefore, CoreMedia.CMTime toleranceAfter);
abstract member Seek : CoreMedia.CMTime * CoreMedia.CMTime * CoreMedia.CMTime -> unit
override this.Seek : CoreMedia.CMTime * CoreMedia.CMTime * CoreMedia.CMTime -> unit

Parameters

toTime
CMTime
toleranceBefore
CMTime

Time tolerance allowed before the time.

toleranceAfter
CMTime

Time tolerance allowed after the time.

Attributes

Remarks

If the tolerance is zero, then the player might need to perform more work before completing.

Use the Async versions of this API to avoid blocking.

Applies to

Seek(NSDate)

Seeks to a specific location in the playback stream.

[Foundation.Export("seekToDate:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 9, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void Seek (Foundation.NSDate date);
abstract member Seek : Foundation.NSDate -> unit
override this.Seek : Foundation.NSDate -> unit

Parameters

date
NSDate

Target data to seek to.

Attributes

Applies to

Seek(CMTime, AVCompletion)

Seeks to a specific time in the playback stream and invokes the completion handler.

[Foundation.Export("seekToTime:completionHandler:")]
public virtual void Seek (CoreMedia.CMTime time, AVFoundation.AVCompletion completion);
abstract member Seek : CoreMedia.CMTime * AVFoundation.AVCompletion -> unit
override this.Seek : CoreMedia.CMTime * AVFoundation.AVCompletion -> unit

Parameters

time
CMTime

Specific time to seek to.

completion
AVCompletion

Method to invoke when the seek operation completes.

Attributes

Applies to

Seek(CMTime)

Seeks to a specific location in the playback stream.

[Foundation.Export("seekToTime:")]
public virtual void Seek (CoreMedia.CMTime toTime);
abstract member Seek : CoreMedia.CMTime -> unit
override this.Seek : CoreMedia.CMTime -> unit

Parameters

toTime
CMTime

Specific time to seek to.

Attributes

Applies to