AirPlay quits when iPhone locks

When I AirPlay from my iPhone to the Apple TV, it stops working as soon as the phone locks. I don’t seem to have the same problem when air playing from my iPad. is this happening to anyone else?

Do you have an exchange account activated on your iPhone? I used to get that and apparently it was caused by exchange.

I don’t have an exchange email account. But I do have a subscribed calendar that’s not on my iPad. Maybe it’s that?