title: AVPlayerItem.duration returns as NaN even after player.status == .readyToPlay
body: <p>I have an implementation using KVO on player.status much like the suggestion documented <a href="https://stackoverflow.com/questions/40781738/how-to-detect-avplayer-actually-started-to-play-in-swift">here</a>.</p>
  
  <p>Here's the relevant bits: </p>
  
  <pre><code>var player: AVPlayer?
  var url = URL(string: "some video url")!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      initializeVideoPlayer()
  }
  
  func initializeVideoPlayer() {
      let playerItem = AVPlayerItem(url: url)
      self.player = AVPlayer(playerItem: playerItem)
      let playerLayer = AVPlayerLayer(player: player)
  
      playerLayer.frame = self.view.layer.bounds
      videoView.layer.addSublayer(playerLayer)
  
      player?.addObserver(self, forKeyPath: "status", options: .new, context: nil)
  }
  
  override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
      if keyPath == "status" {
          if player?.status == .readyToPlay {
              print(player?.currentItem?.duration)
              print(CMTimeGetSeconds((player?.currentItem?.duration)!))
  
  //          let videoLength = CMTimeGetSeconds((player?.currentItem?.duration)!)
  //          videoProgressSlider.maximumValue = Float(videoLength)
          }
      }
  }
  </code></pre>
  
  <p>Despite the status, what's returned is still NaN.</p>
  
  <p>Solution:</p>
  
  <p>So it's come to my attention that both AVPlayer AND AVPlayerItem have status properties. By KVO'ing the AVPlayerItem.status property as opposed to the AVPlayer.status like I had done, the duration will be returned properly.</p>