Photos on Apple Airplay
A few days ago, I had to see if it was possible to stream photos to an AppleTV via Apple's Airplay protocol. After reading Apple's documentation, I figured that using the API available on iOS, it was possible to stream audio and video only! But no photos! (What!? Why? Apple is weird!)
Further digging led me to the fact that Airplay is a protocol over HTTP (for streaming) & Bonjour (for service discovery). This page is a link to an unofficial spec of the Airplay protocol. Erica Sadun has written some tools for the reverse engineered protocol too!
Hence to implement photo streaming on Airplay, I had to use Bonjour to find the available Airplay receivers. This can be done using the NSNetServiceBrowser class to search for a service named: "_airplay._tcp". Once you resolve the service to it's IP address, streaming photos to the AppleTV is just a matter of sending a HTTP PUT request to it's IP.
Wonder why photo streaming is restricted to Apple's photos app. Typical Apple!
Comments
Post a Comment