Is there some documentation on Apple's Developer site about this functionality?
It is internal protocols and not documented by Apple. AirPlay 2 documentation is probably available under NDA for partners as it can be licensed. Not the parts used here though.
Let me know if you need any help with protocol related things, I already did most of the reverse engineering for pyatv (both for tvOS 15 support and the Companion protocol, used for app launching amongst other things). I'm interested in any other potential findings you make.
Intrinsic AppleTV Driver NOT compatible with TVOS 15
in General Control4 Discussion
Posted
It is internal protocols and not documented by Apple. AirPlay 2 documentation is probably available under NDA for partners as it can be licensed. Not the parts used here though.