Airplay not working

I recently bought a new LG Tv and the airplay is the most on and off thing I’ve ever had the displeasure of using. One day it works perfect and the next I’m trying to connect my phone for an hour to no end. I’ve tried everything and I’m at my wits end does anybody have a solution?