Editar

Compartir a través de


AVPlayerItem.Seek Method

Definition

Overloads

Seek(CMTime, CMTime, CMTime, AVCompletion)

Seeks to a specific location in the playback stream

Seek(NSDate, AVCompletion)

Seeks the player to the specified date.

Seek(CMTime, CMTime, CMTime)

Seeks to the specified time, within the specified tolerances.

Seek(NSDate)

Seeks date target.

Seek(CMTime, AVCompletion)

Seeks the player to the specified time.

Seek(CMTime)

Seeks to the specified time.

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 the player to the specified date.

[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 bool Seek (Foundation.NSDate date, AVFoundation.AVCompletion completion);
abstract member Seek : Foundation.NSDate * AVFoundation.AVCompletion -> bool
override this.Seek : Foundation.NSDate * AVFoundation.AVCompletion -> bool

Parameters

date
NSDate

Date to seek to.

completion
AVCompletion

Method to invoken once the seek operation has completed.

Returns

Attributes

Applies to

Seek(CMTime, CMTime, CMTime)

Seeks to the specified time, within the specified tolerances.

[Foundation.Export("seekToTime:toleranceBefore:toleranceAfter:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.None, "Use 'Seek (CMTime, CMTime, CMTime, AVCompletion)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Seek (CMTime, CMTime, CMTime, AVCompletion)' instead.")]
public virtual void Seek (CoreMedia.CMTime time, CoreMedia.CMTime toleranceBefore, CoreMedia.CMTime toleranceAfter);
[Foundation.Export("seekToTime:toleranceBefore:toleranceAfter:")]
public virtual void Seek (CoreMedia.CMTime time, 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

time
CMTime

Seek time target.

toleranceBefore
CMTime
toleranceAfter
CMTime
Attributes

Applies to

Seek(NSDate)

Seeks date target.

[Foundation.Export("seekToDate:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.None, "Use 'Seek (NSDate, AVCompletion)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Seek (NSDate, AVCompletion)' instead.")]
public virtual bool Seek (Foundation.NSDate date);
[Foundation.Export("seekToDate:")]
public virtual bool Seek (Foundation.NSDate date);
abstract member Seek : Foundation.NSDate -> bool
override this.Seek : Foundation.NSDate -> bool

Parameters

date
NSDate

Date to seek to.

Returns

Attributes

Applies to

Seek(CMTime, AVCompletion)

Seeks the player to the specified time.

[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

Seek time target.

completion
AVCompletion

Method to invoken once the seek operation has completed.

Attributes

Applies to

Seek(CMTime)

Seeks to the specified time.

[Foundation.Export("seekToTime:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.None, "Use 'Seek (CMTime, AVCompletion)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Seek (CMTime, AVCompletion)' instead.")]
public virtual void Seek (CoreMedia.CMTime time);
[Foundation.Export("seekToTime:")]
public virtual void Seek (CoreMedia.CMTime time);
abstract member Seek : CoreMedia.CMTime -> unit
override this.Seek : CoreMedia.CMTime -> unit

Parameters

time
CMTime

Seek time target.

Attributes

Applies to