title: AVPlayer, long pause followed by resume = glitch
body: <p>I'm using <code>AVPlayer</code> for live audio streams. If I pause the player and resume, it picks up where it left off (which is great). Except if the player has been paused for so long that it stops getting new data from the network. In that case, when playback resumes, it first plays any buffered data and then switches to live data.</p>
  
  <p>This is really annoying. It sounds like you just picked up where you left off but then, surprise, you jump ahead. The switch from hearing old pre-pause buffer data to hearing new live audio sucks.</p>
  
  <p>What I'd like to do is, when the pause is "long", release the <code>AVPlayer</code>. That way if the user presses "play" again they get only new live audio, not the old buffered data. I know that will mean a delay before playback begins, but I think that's better than the audio discontinuity I'm getting now.</p>
  
  <p>I don't see any way to detect this situation. I thought I could observe <code>playbackBufferFull</code> on the current <code>AVPlayerItem</code>, but that never seems to change. Even when Instruments shows no incoming network traffic, playbackBufferFull is still 0.</p>
  
  <p>At the moment I'm just using a two-minute timeout, i.e. if playback doesn't resume within two minutes, release the AVPlayer. If the user later presses "play", start fresh with a new player. Experimentally, two minutes seems to be not terrible, though not actually good. Is there a better way to do this?</p>