Instance Property

isReadyForDisplay

A Boolean value that indicates whether the first video frame has been made ready for display for the current item of the associated player.

Declaration

var isReadyForDisplay: Bool { get }

Discussion

Use this property as an indicator of when best to show or animate-in a player layer into view. A player layer may be displayed, or made visible, while this property is false, however the layer will not have any user-visible content until the value becomes true.

This property remains false for a player’s currentItem whose asset contains no enabled video tracks.

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

See Also

Configuring Player Layer Values

var player: AVPlayer?

The player for which the player layer displays visual output.

var videoGravity: AVLayerVideoGravity

A value that specifies how the video is displayed within a player layer’s bounds.

struct AVLayerVideoGravity

A value that defines how the video is displayed within a layer’s bounds rectangle.

var videoRect: CGRect

The current size and position of the video image as displayed within the receiver's bounds.

var pixelBufferAttributes: [String : Any]?

The client requirements for the visual output displayed in the player layer during playback.

func AVMakeRect(aspectRatio: CGSize, insideRect: CGRect) -> CGRect

Returns a scaled rectangle that maintains the specified aspect ratio within a bounding rectangle.