reasonForWaitingToPlay
The reason the player is currently waiting for playback to begin or resume.
Declaration
nonisolated var reasonForWaitingToPlay: AVPlayer.WaitingReason? { get }Discussion
When the value of the player’s timeControlStatus is AVPlayer.TimeControlStatus.waitingToPlayAtSpecifiedRate, you can use this property determine the reason the player is currently waiting for playback to begin or resume. Possible values for this property are:
The value of this property will be nil if the player’s timeControlStatus is a value other than AVPlayer.TimeControlStatus.waitingToPlayAtSpecifiedRate.
You can use the value of this property to conditionally show UI indicating the player’s waiting state. This property is observable using key-value observing.