This is resolved. The problem was that I bought a wireless Chinese security camera and added it to my network. I don’t know if it is malicious or just poor design but it seems to have interfered with Airplay and messed up my network. I had to do a hard reset on my router and Apple TV to get them working well again. The RPi running Max2Play just started working normally again.