title: How can I add a smooth fade in/out transition to AVPlayerLooper?
body: <p>I have an <code>AVPlayerLooper</code> which uses an <code>AVQueuePlayer</code>. It's really easy to loop the video, but I wanted to fade in the video during the first second, and fade out during the last second. I've been able to make it fade in and out by using an <code>AVPlayerLayer</code> and a <code>CABasicAnimation</code> which animates the opacity appropriately, but I can't make it seamless and 100% reliable. I've tried using <code>NotificationCenter</code> for the <code>AVPlayerItemDidPlayToEndTime</code> and <code>AVPlayerItemTimeJumped</code>. I've also tried using KVO with the key <code>isReadyForDisplay</code>. When I tried to <code>addPeriodicTimeObserver</code>, I can't get it accurate enough to correctly time the fades. I've even tried to <code>addBoundaryTimeObserver</code>, but that wasn't consistent enough either. </p>
  
  <p>Does anybody have any suggestions as to how to implement a crossfade into an AVPlayerLooper/AVQueuePlayer?</p>