2

I am aware that iOS 4.3 has a new API that lets developers send video from their Apps to an AppleTV. Is there any public API that allows developers to stream still images (Jpegs) instead of video to an Apple TV?

Jackson
  • 3,555
  • 3
  • 34
  • 50
  • maybe turn ur slideshow of jpegs into a movie? just a thought.. – Ibz Mar 10 '11 at 01:58
  • Is there any built in API to do that? Might be an interesting solution but I'm not sure it would be ideal. My app pulls live webcam images from the web and displays them as a slideshow but since they are live images they would need to be pulled and converted to a movie and then the entire movie would need to be remade every time one image changed. hmm... – Jackson Mar 10 '11 at 16:43
  • I see your problem.. it may be that there is a workaround, its just a case of thinking of it and finding it.. sorry i cant be of help.. im not really familiar with airplay.. Keep looking though.. must be a way.. – Ibz Mar 10 '11 at 17:31

2 Answers2

4

No, only videos.

https://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS4_3.html%23//apple_ref/doc/uid/TP40010567-SW1

h4xxr
  • 11,385
  • 1
  • 39
  • 36
  • Too bad, that would have been really nice for my app if I could display photos on an ATV. – Jackson Mar 10 '11 at 16:41
  • Is possible with iOS 5. See "Make the Most of a Second Display" in the Document: "AirPlay Overview". Tricky part is enabling airplay, as this happens outside your app's UI. – bentford Jun 06 '12 at 23:01
4

Yes this is possible. I am doing this in a presentation app for iPad.

When the Apple TV is connected to your device with mirroring:

  • Get a reference to the external screen UIScreen *external = [[UIScreen screens] objectAtIndex: 1];

  • Set the view you want to send to the tv to use this screen tvoutWindow.screen = external;

Then send any content to this view. I have a UIImageView in the tvoutWindow which is displaying UIImages for me

  • Sounds promising. I need to try playing around with this some time soon. Do you have any advise on how to test an app that uses Airplay while you're coding it? I have an Apple TV but it would be nice to be able to test it in the simulator rather than having to compile and install it on my device and then send it to the TV every time. – Jackson Nov 15 '11 at 16:57
  • Stupid question - I just realized that the current version of Xcode has a simulator which simulates TV output. Cool! – Jackson Nov 16 '11 at 01:24
  • 1
    I think you're answering a different question. What you are describing with the external UIScreen works when the Apple TV is "screen mirroring" or when connected to an external device through an HDMI adapter. The original question was whether you can send still Photos through AirPlay -- the answer is no, at this time only video, per the answer from h4xxr. – natbro Jan 07 '12 at 21:53