'Is there any public api to detect AirPlay available or not

I have implement the MPVolumeView to show Airplay option but I don't know how to hide MPVolumeView if Airplay options/sources are no longer available.

Is there any public API which can detecting AirPlay option/source are available or not. So that application can hide/show the airplay option.

NOTE: I am using custom player not the default MPMoviePlayerController

Thanks!



Solution 1:[1]

In addition to the correct response the MPVolumeViewWirelessRoutesAvailableDidChangeNotification it's been deprecated for this one AVRouteDetectorMultipleRoutesDetectedDidChangeNotification

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 César Bermúdez