2

AVPlayer has 2 formal conditions that should hold to indicate it's ready to play:

  1. status == AVPlayerStatusReadyToPlay.
  2. currentItem.status == AVPlayerItemStatusReadyToPlay.

Several developers had noticed that these indicators are not enough, and videos don't actually start playing until loadedTimeRanges indicates ready-ness (see here and here for implementation details).

These properties should be observed to be put to use, which is costly.

Does a non-zero value in loadedTimeRanges indicates that the player and playerItem's statuses are ready? This can save 2 observations.

danielhadar
  • 2,031
  • 1
  • 16
  • 27

0 Answers0