title: UIEvents sent from Apple TV while using AVPlayer external playback mode
body: <p>I have an app that displays videos, and it's very important to us that we intercept all pause events, and prevent users from seeking in videos.</p>
  
  <p>Doing it on device is pretty simple, we just don't expose any 'regular' controls to user, and in <code>-remoteControlReceivedWithEvent:</code>, we wrap all events that we're actually interested in.</p>
  
  <p>But we're struggling with supporting Apple TV. It's our understanding that it should forward all events sent from Apple Remote to our app, as per [0]: </p>
  
  <blockquote>
    <p>When AirPlay is in use, your media might be playing in another room from your host device. The AirPlay output device might have its own controls or respond to an Apple remote control. For the best user experience, your app should listen for and respond to remote events, such as play, pause, and fast-forward requests. Enabling remote events also allows your app to respond to the controls on headphones or earbuds that are plugged into the host device.</p>
  </blockquote>
  
  <p>However, as far as I can see from my debugging and pulled hair, it doesn't apply to cases where you let AVPlayer handle displaying your video. We actually don't do anything at all to make videos play on TV, since AVPlayer's <code>allowsExternalPlayback</code> property is <code>YES</code> by default.</p>
  
  <p>If I'm understanding docs correctly, while using that mode with Apple TV, only URL/data from device is sent to Apple TV, and aTV does the decoding and rendering part on it's own, as per [1]:</p>
  
  <blockquote>
    <p>External playback mode is when video data is sent to an external device such as Apple TV via AirPlay and the mini-connector-based HDMI/VGA adapters for full screen playback at its original fidelity. AirPlay Video playback is also considered as an "external playback" mode.</p>
  </blockquote>
  
  <p>which could potentially explain why I don't receive any events on device (e.g. someone at Apple thought that since aTV does the heavy lifting and actually decoding and rendering, apps on device shouldn't receive those events).</p>
  
  <p>So, my question is basically this - is there any obvious tree I'm missing from the forest, or do I have no retreat other than either: </p>
  
  <ul>
  <li>ugly hacks using KVO on playback position and playback rate, and punishing users for 'cheating'</li>
  <li>reimplementing whole video rendering on my own, treating TV screen as second display</li>
  </ul>
  
  <p>Any pointers will be greatly appreciated.</p>
  
  <p>[0] <a href="https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AirPlayGuide/EnrichYourAppforAirPlay/EnrichYourAppforAirPlay.html" rel="noreferrer">https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AirPlayGuide/EnrichYourAppforAirPlay/EnrichYourAppforAirPlay.html</a></p>
  
  <p>[1] <a href="https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/Chapters/Reference.html#//apple_ref/occ/cl/AVPlayer" rel="noreferrer">https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/Chapters/Reference.html#//apple_ref/occ/cl/AVPlayer</a></p>