UPDATE. This issue has been resolved with the recent Yosemite update. However the following is beneficial if you have not updated or are still experiencing issues.
Recently I noticed that when mirroring my computer to my AppleTV, that I was unable to browse the internet. Once disconnecting AirPlay WiFi was back up and running. After some searching I have found the following.
The issue is related to AWDL (Apple Wireless Direct Link) and AirDrop. The following site provides some great information regarding this issue and also has an app for Yosemite which will allow you to easily disable/enable AWDL and AirDrop.
It is important to remember, that if you use the software supplied by the above link you will need to remember you are using it as your ability to use AirDrop will not be available while the application is doing it's job.
I would also recommend ensuring that you have disable AWDL/AirDrop prior to connecting to AirPlay and that once you have finished using AirPlay that you enable AWDL/AIrDrop again (especially if you are a big user of AirDrop).