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 |
Returns true on Mac OS X 10.7 and newer.
AVPlayerItemMBS.playerItemWithAsset(asset as AVAssetMBS) as AVPlayerItemMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
See also:
Some examples using this method:
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 |
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 |
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 |
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.