I'm going to assume that this is an app enabled/disabled option.
I know that when I airplay from youtube to my Apple TV as soon as the video starts playing, I can put my phone into sleep mode and the content continues playing on TV without interruption.