MacOS – Disable Airplay on Mac because of too many Airplay devices

airplaybonjourmacosNetwork

I'd like to find a solution to my problem. I recently moved to a dorm of around 1100 students, and each one of these students has a mediabox that is also an Airplay device.

Because of this, the Airplay service seems to completely destroy the sound on the client and make it very slow. I've worked around this by just disabling bonjour altogether by unloading the mDNSResponder and mDNSResponderHelper plists from the launch daemons, but this also makes the multicast announcements of my IPTV service fail.

I've tried blocking the bonjour packets to no success either (with Littlesnitch).

I'd just like it to not load the Airplay devices at all, so it doesn't get hogged up with them.

Information about my system: OSX 10.9.3 (on both a Macbook and an iMac).
Things I've tried:

  1. Chmodding the mDNSService to 000 (doesn't work that well)
  2. Blocking the ports associated with Airplay announcements (5353)
  3. Completely unloading the mDNSResponder and mDNSResponderHelper

I'm connected through a wired network, and the announcements are sent via multicast announcements (as with my IPTV).

Best Answer

Try Disable AirPlay Mirroring in your terminal

sudo chmod 000 

/System/Library/CoreServices/AirPlayUIAgent.app/Contents/MacOS/AirPlayUIAgent

To turn it back on

sudo chmod 755 

/System/Library/CoreServices/AirPlayUIAgent.app/Contents/MacOS/AirPlayUIAgent

Here is the list of Ports used by Airplay

airplay ports

source