title: AVPlayer in iOS8 disappears when adding as a sublayer to second view
body: <p>The views init and create everything just fine, however when I move the AVPlayer from one view layer to another, it disappears. The video goes away (black on full screen view and white on original sized view), but the audio still plays. My controls still work (play/pause/scrub).</p>
  
  <p>My application was built for iOS7. In the simulator and on devices, this works. In the simulator for iOS8, this works. Only on iOS8 devices does this not work.</p>
  
  <p>Code below:</p>
  
  <pre><code>AVAsset *avAsset = [AVAsset assetWithURL:fileURL];
  AVPlayerItem *avPlayerItem =[[AVPlayerItem alloc]initWithAsset:avAsset];
  self.currentPlayer = [[AVPlayer alloc] initWithPlayerItem:avPlayerItem];
  AVPlayerLayer *tmpPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:self.currentPlayer];
  tmpPlayerLayer.frame = self.videoDetailViewPlayer.bounds;
  [self.videoDetailViewPlayer.layer addSublayer:tmpPlayerLayer];
  </code></pre>
  
  <p>*fileURL is an NSURL properly formatted and retrieves a proper object with a fully qualified URL tested against each OS.
  **self.videoDetailViewPlayer.bounds is full screen and I've checked to make sure it does have proper w &amp; h. (I have tried [tmpPlayer setFrame] as well as the current setup above, using both frame and bounds. In everything but iOS8 on a device, it works.</p>
  
  <p>Again, audio continues, but the video seems lost.</p>
  
  <p>Edit: I am not sure what causes the player to continue working, but the AVPlayer will keep playing audio, regardless of whether there is a layer for video. I have 2 views that I am alternating the playerlayer between, and maybe I should just add it to both, but according to the docs, "Only the most recently created player layer will actually display the video content on-screen." (<a href="https://developer.apple.com/LIBRARY/ios/documentation/AVFoundation/Reference/AVPlayerLayer_Class/index.html" rel="nofollow">https://developer.apple.com/LIBRARY/ios/documentation/AVFoundation/Reference/AVPlayerLayer_Class/index.html</a>). If I create the tmpPlayerLayer from the original view, add that to my other view, then make the layer nil for the first view, it works (but won't resize, yet). If I try to create a new AVPlayerLayer (as noted above), it just stops displaying video completely...still investigating, but any pointers might help.</p>