Instance Property

status

The status of the player item.

Declaration

var status: AVPlayerItem.Status { get }

Discussion

When a player item is created, its status is AVPlayerItem.Status.unknown, meaning its media hasn’t been loaded and has not yet been enqueued for playback. Associating a player item with an AVPlayer immediately begins enqueuing the item’s media and preparing it for playback. When the player item’s media has been loaded and is ready for use, its status will change to AVPlayerItem.Status.readyToPlay. You can observe this change using key-value observing.

For possible values, see AVPlayerItem.Status.

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 tracks: [AVPlayerItemTrack]

An array of player item track objects.

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.