The following are valid constant values for the player’s reasonForWaitingToPlay property.


struct WaitingReason


Player Waiting Reasons

static let evaluatingBufferingRate: AVPlayer.WaitingReason

Indicates that the player is monitoring the playback buffer fill rate to determine if playback is likely to complete without interruptions. It is recommended that you do not show UI indicating a waiting state to the user while this is the value of reasonForWaitingToPlay.

static let noItemToPlay: AVPlayer.WaitingReason

Indicates that the player is waiting because its currentItem is nil.

static let toMinimizeStalls: AVPlayer.WaitingReason

Indicates that the player is waiting for appropriate playback buffer conditions before starting playback. Playback will continue when playback can continue without a stall at the player specified rate. Playback will also continue if the player item’s playback buffer becomes full and no further buffering of media data is possible.


See Also

Managing Automatic Waiting Behavior

var automaticallyWaitsToMinimizeStalling: Bool

A Boolean value that indicates whether the player should automatically delay playback in order to minimize stalling.

var reasonForWaitingToPlay: AVPlayer.WaitingReason?

The reason the player is currently waiting for playback to begin or resume.

var timeControlStatus: AVPlayer.TimeControlStatus

A status that indicates whether playback is currently in progress, paused indefinitely, or suspended while waiting for appropriate network conditions.

func playImmediately(atRate: Float)

Plays the available media data immediately, at the specified rate.