iOS developer extraordinaire Erica Sadun decided to take a look into iOS 4.2's AirPlay feature (and see if she could figure out why it was restricted to audio-only outside Apple's YouTube and iPod/Video apps (i.e. there are only audio AirPlay API currently available to 3rd party App Store developers). Here's what she's found so far:
Having gotten this proof of concept working, there's still a lot left to get done to transform this into a stable solution that works with general applications. Keep in mind that you'll be working with unpublished APIs, so the above classes and code are not App Store Safe. That's why we have a jailbreak world, after all.
The bad news is it looks like it will take an "Act of Apple" to get proper, video-supporting AirPlay API into developers hands and into App Store apps. (So developers, get thee to the bug report system and ask for this to be fixed and surfaced asap). The good news, at least for now, is that Steven Troughton-Smith has reduced the process to a single line of code, eliminating the YouTube work-around.
Yes, it still won't be App Store safe, but it's jailbreak friendly, works flawlessly, and suggests only a single item that Apple could move to a public API to open up this functionality to developers. What's more, with a little screen scraping or off-screen layer manipulation and a clever use of AVFoundation, you can probably have games working out to Apple TV almost immediately.
Indeed...! Check out her full post via the link below for details on how it all works.