Is it possible to detect viewer transition from iOS client to Airplay receiver?

Hi,


I am using a loopback server that runs locally on iOS client to implement HLS streaming with custom AVAssetResourceLoader. I am able to stream segments via local host on the device. Airplay also works fine if I use an external IP instead of local host to stream the segments. However, when I use local host, I need to detect the viewer transition from iOS client to Airplay receiver and send the CDN url to the airplay receiver (instead of local host url) so that it can play the content. I could not find any documentation on how to detect the transition from iOS client to Airplay receiver. The property externalPlaybackActive only seems to detect once the airplay receiver is playing the content and not for the transition. Is there any way to detect when Airplay is enabled?

Accepted Reply

>Is there any way to detect when Airplay is enabled?


Seen this SO thread?

https://stackoverflow.com/questions/45559187/ios-detect-airplay-during-app-launch

Replies

>Is there any way to detect when Airplay is enabled?


Seen this SO thread?

https://stackoverflow.com/questions/45559187/ios-detect-airplay-during-app-launch