Instance Property

tracks

An array of player item track objects.

Declaration

var tracks: [AVPlayerItemTrack] { get }

Discussion

This property can change dynamically during playback. When linked against iOS 7.0 or later, before the underlying tracks have been loaded, the value of this property is an empty array. Use key-value observing to obtain a valid tracks array as soon as it becomes available.

See Also

Inspecting a Player Item

var asset: AVAsset

The asset provided during initialization.

var automaticallyLoadedAssetKeys: [String]

The array of asset keys to be automatically loaded before the player item is ready to play.

var status: AVPlayerItem.Status

The status of the player item.

enum AVPlayerItem.Status

The statuses for a player item.

var duration: CMTime

The duration of the item.

var timebase: CMTimebase?

The timebase information for the item.

var loadedTimeRanges: [NSValue]

An array of time ranges indicating media data that is readily available.

var presentationSize: CGSize

The size at which the visual portion of the item is presented by the player.

var timedMetadata: [AVMetadataItem]?

An array of the most recently encountered timed metadata.

Deprecated
var error: Error?

The error that caused the player item to fail.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software