Instance Property

status

A status that indicates whether the player can be used for playback.

Declaration

var status: AVPlayer.Status { get }

Discussion

The player’s status indicates whether the player can be used for playback. When the value of this property is AVPlayer.Status.failed, you can no longer use the player for playback and you need to create a new instance to replace it. If this happens, you can check the value of the player’s error property to determine the nature of the failure.

This property is key value observable using Key-value observing.

See Also

Getting Player Properties

enum AVPlayer.Status

The statuses that indicate whether a player can successfully play items.

var error: Error?

The error that caused the failure.

var currentItem: AVPlayerItem?

The player’s current player item.

var isOutputObscuredDueToInsufficientExternalProtection: Bool

A Boolean value that indicates whether output is being obscured because of insufficient external protection.

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