Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVPlayerItemMBS class.

AVPlayerItemMBS.available as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether this class is available.

Returns true on Mac OS X 10.7 and newer.

AVPlayerItemMBS.playerItemWithAsset(asset as AVAssetMBS, automaticallyLoadedAssetKeys() as string) as AVPlayerItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and initializes a player item with an array of AVAsset keys.

asset: An instance of AVAsset.
automaticallyLoadedAssetKeys: An array of strings, each representing a property key defined by AVAsset.
Returns an initialized instance of AVPlayerItem.

The value of each key in automaticallyLoadedAssetKeys will be automatically be loaded by the underlying AVAsset before the receiver achieves the status AVPlayerItemStatusReadyToPlay; i.e. when the item is ready to play, the value returned by invoking the asset property's statusOfValueForKey:error: method will be one of the terminal status values, either AVKeyValueStatusLoaded, AVKeyValueStatusFailed, or AVKeyValueStatusCancelled.

Important: The asset property keys "playable" and "compatibleWithSavedPhotosAlbum" are not eligible for automatic loading by AVPlayerItem. You must use the AVAsset method loadValuesAsynchronouslyForKeys:completionHandler: to load the values of those properties asynchronously.

Available in OS X v10.9 and later.

See also:

AVPlayerItemMBS.playerItemWithFile(file as folderitem) as AVPlayerItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new player item, prepared to use a given folderitem.

File: A folderitem.
Returns a new player item, prepared to use folderitem.

This method immediately returns the item, but with the status AVPlayerItemStatusUnknown.
If the URL contains valid data that can be used by the player item, the status later changes to AVPlayerItemStatusReadyToPlay.
If the URL contains no valid data or otherwise can't be used by the player item, the status later changes to AVPlayerItemStatusFailed.

AVPlayerItemMBS.playerItemWithURL(URL as string) as AVPlayerItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new player item, prepared to use a given URL.

URL: An URL.
Returns a new player item, prepared to use URL.

This method immediately returns the item, but with the status AVPlayerItemStatusUnknown.
If the URL contains valid data that can be used by the player item, the status later changes to AVPlayerItemStatusReadyToPlay.
If the URL contains no valid data or otherwise can't be used by the player item, the status later changes to AVPlayerItemStatusFailed.

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


The biggest plugin in space...