title: Is there a way to keep Airplay running if the device auto-sleeps/auto-locks?
body: <p>When streaming a video from an iPhone (or any iOS device) to a TV via Airplay, the stream stops as soon as the device goes to sleep from inactivity. At the moment, I disabled the sleep timer so that the device does not automatically sleep, but is there a better solution to this?</p>
  
  <p>Is setting <code>AVPlayer.externalPlaybackActive</code> enough to allow the OS to know to keep playing when the screen is off? If not, is there an alternate way to keep Airplay running even if the device turns off its screen?</p>