I'm unable to find code online (yes, googled aplenty) that details how to discover devices that support the audio only version of Airplay. There doesn't seem to be anything on Apple's developer site either - I spent an hour scouring Google and searching through Apple's documentation. I'm clearly missing something here.
I did find this: "Using External Display", but that only describes how to discover and connect to devices that support Airplay mirroring. They essentially are recognized as another display and you just begin drawing to it.
I also found this: "Providing an AirPlay Picker", but it only describes how to create an AirPlay picker when a device is available, not how to know when a device is available in general (I'd like to do other logic in my app based on audio device availability).
My end goal here is to prevent the user from trying to use an audio-only Airplay device for my app, which requires video support. I planned to show a warning message when 1+ audio-only devices and 0 video-capable devices were detected.
I'm specifically interested in the code for audio-only devices, like the Apple TV 1st gen, AirPorts, and Airplay-enabled speakers. This is particularly important considering that Apple TVs don't look visibly different across generations, and a user might think they can use the app over Airplay when in fact they cannot.
Can someone point me towards the right resource?