Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVPlayerItemMBS class.

AVPlayerItemMBS.seekableTimeRanges as CMTimeRangeMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An array of time ranges within which it is possible to seek. (read-only)

AVPlayerItemMBS.seekToDate(date as date, fireEvent as boolean = false, tag as Variant = nil) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Moves the playback cursor to the time given by the specified date object.

date: The time to which to seek.

If fireEvent is true, the AVFoundationMBS.playerItemSeekToDateFinished event is called.

Use this method to seek to a specified time in the item item and be notified when the operation completes. If the seek request completes without being interrupted (either by another seek request or by any other operation), the completion handler you provide is executed with the finished parameter set to true.

If another seek request is already in progress when you call this method, the completion handler for the in-progress seek request is executed immediately with the finished parameter set to NO.
Available in OS X v10.9 and later.

AVPlayerItemMBS.seekToDateTime(date as dateTime, fireEvent as boolean = false, tag as variant = nil) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Moves the playback cursor to the time given by the specified date object.

date: The time to which to seek.

If fireEvent is true, the AVFoundationMBS.playerItemSeekToDateFinished event is called.

Use this method to seek to a specified time in the item item and be notified when the operation completes. If the seek request completes without being interrupted (either by another seek request or by any other operation), the completion handler you provide is executed with the finished parameter set to true.

If another seek request is already in progress when you call this method, the completion handler for the in-progress seek request is executed immediately with the finished parameter set to NO.
Available in OS X v10.9 and later.

AVPlayerItemMBS.seekToTime(time as CMTimeMBS, fireEvent as boolean = false, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Moves the playback cursor to a given time.

time: The time to which to move the playback cursor.
If fireEvent is true, the AVFoundationMBS.playerItemSeekToTimeFinished event will be called later.

Use this method to seek to a specified time in the item item and be notified when the operation completes. If the seek request completes without being interrupted (either by another seek request or by any other operation), the event is executed with the finished parameter set to true.

If another seek request is already in progress when you call this method, the completion handler for the in-progress seek request is executed immediately with the finished parameter set to false.

With tag you can pass any value you like to the event later. This can be for example an object reference or a number in an array. Be aware that the reference to this tag value is kept until the event is called and can cause memory reference cycles.

See also:

AVPlayerItemMBS.seekToTime(time as CMTimeMBS, toleranceBefore as CMTimeMBS, toleranceAfter as CMTimeMBS, fireEvent as boolean = false, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Moves the playback cursor within a specified time bound.

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.

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.

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

With tag you can pass any value you like to the event later. This can be for example an object reference or a number in an array. Be aware that the reference to this tag value is kept until the event is called and can cause memory reference cycles.

See also:

AVPlayerItemMBS.selectedMediaOptionInMediaSelectionGroup(mediaSelectionGroup as AVMediaSelectionGroupMBS) as AVMediaSelectionOptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates the media selection option that's currently selected from the specified group.

mediaSelectionGroup: A media selection group obtained from the player item's asset.

Returns an instance of AVMediaSelectionOption that describes the currently selection option in the group.

If the value of the allowsEmptySelection property of mediaSelectionGroup is true, the currently selected option in the group may be nil.
Available in OS X v10.8 and later.

AVPlayerItemMBS.selectMediaOption(mediaSelectionOption as AVMediaSelectionOptionMBS, mediaSelectionGroup as AVMediaSelectionGroupMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Selects the media option described by a specified instance of AVMediaSelectionOption in a given media selection group and deselects all other options in that group.

mediaSelectionOption: The option to select.
If the value of the allowsEmptySelection property of mediaSelectionGroup is true, you can pass nil to deselect all media selection options in the group.
mediaSelectionGroup: The media selection group, obtained from the receiver's asset, that contains mediaSelectionOption.

If mediaSelectionOption isn't a member of the mediaSelectionGroup, no change in presentation state will result.

If multiple options within a group meet your criteria for selection according to locale or other considerations, and if these options are otherwise indistinguishable to you according to media characteristics that are meaningful for your application, content is typically authored so that the first available option that meets your criteria is appropriate for selection.
Available in OS X v10.8 and later.

AVPlayerItemMBS.selectMediaOptionAutomaticallyInMediaSelectionGroup(mediaSelectionGroup as AVMediaSelectionGroupMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Selects the media option in the specified media selection group that best matches the receiver's automatic selection criteria.

mediaSelectionGroup: The media selection group, obtained from the receiver's asset, that contains the specified option.

This method has no effect unless the appliesMediaSelectionCriteriaAutomatically property of the associated AVPlayer is true and unless automatic media selection has previously been overridden by invoking sselectMediaOption:inMediaSelectionGroup.
Available in OS X v10.9 and later.

AVPlayerItemMBS.setTextStyleRules(rules() as AVTextStyleRuleMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the textStyleRules array.

AVPlayerItemMBS.stepByCount(stepCount as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Moves the player's current item's current time forward or backward by a specified number of steps.

stepCount: The number of steps by which to move.
A positive number steps forward, a negative number steps backward.

The size of each step depends on the receiver's enabled AVPlayerItemTrack objects (see tracks).

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...