This problem may happen for plenty of reasons, ranging from misconfigured wireless connection and poor signal to overtaxed network and radio frequency interference. Make sure you are using recommended settings for your Wi-Fi router. If you suspect interference with nearby devices, try to turn them off temporarily. Your AirPlay connection might also get interrupted when you lock or put your device to sleep or switch to a different app.