AirPlay HackWhen Apple released the first beta version of iOS 4.2, we were excited about the AirPlay feature as it allowed users to stream content from apps like YouTube, Netflix, Mobile Safari that implemented the video playback controller to stream audio and video content to the new Apple TV.

However, when iOS 4.2.1 was released finally on Monday, we were disappointed to find out that the AirPlay feature was only available on the iPod and YouTube app and it was possible to only stream audio from third party apps.

Erica Sadun, iPhone developer and hacking expert who writes for TUAW was not pleased with this limitation and has figured out a way to enable video streaming from third party iPhone apps using the AirPlay feature using unpublished APIs. She explains:

AirPlay Video is part of a public framework called MediaPlayer. This is the same MediaPlayer framework that developers use to show video in their applications. The current movie players ship with an AirVideo selection option built right in. The problem is that when you select AirVideo in a non-Apple application, the video continues to play on-device; only the audio is re-routed through the server to Apple TV. [..]

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.

iPhone developer and hacker, Steven Troughton-Smith has optimized Erica’s work to a single line of code that can be implemented by developers and has also eliminated the need for the YouTube workaround. Erica goes on to add:

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.

You can checkout the custom AirPlay video app that Erica has developed using unpublished APIs:


So the good news is that we can probably expect some jailbreak apps that will allow users to stream video and audio content to the new Apple TV.

As for the App Store apps, we will probably have to wait for Apple to make the APIs public so developers can add the feature to their apps.

You can follow on Twitter or join our Facebook page to keep yourself updated on all the latest from Apple and the Web.