iPhone and iPad lock while playing videos over Airplay It seems like this started happening relatively recently, but I am not sure what changed - when I am playing any kind of video (YouTube, Safari, etc.) over Airplay to my Apple TV, the default screen lock will activate and the video stops playing.

Any idea why this is happening, or how to stop it? It doesn't seem to happen when playing a video on the device, only when playing over Airplay.
I have the hdmi adapter and I think iOS handles that the same way as air play does.
Some apps like Amazon Video or the movies app have a good support for AirPlay. I can lock my iPhone and it will go on. But the last time I checked YouTube it didn't had the good support, it only mirrored the screen.
I think this is a problem of the app you are using.