TUAW Hacks Apple TV - Now iOS Devices Can Play 3rd Party Video Over AirPlay

Apple just announced a sassy little update for their iDevices by the name of iOS 4.2. One of the neat things this update brought with it was the ability to use AirPlay to play media from your iDevice wirelessly to a screen connected to an Apple TV device. Neat, right? Not so neat when you consider the fact that it'd play video ONLY if you were playing it from an Apple-approved application (aka no VLC or YouTube allowed!) What Erica Sadun / Steven Troughton-Smith have done is to... well.. hack and fix this with some codes and such.

Advertisement

Now the [solution] to all of this isn't quite stable yet. Several times, Erica says, she's had to reboot using these fixes she's whipped up, and of course you'll have to have a jailbroken device. She suggests you hang out for a minute over at https://bugreport.apple.com/ and send them a feature request "to expose this functionality through an open API and to extend it to general UIView mirroring."

After creating some initial codes that worked alright, Erica had a chat with a mister Steven Troughton-Smith about leveling up the code, suggesting that YouTube might have an improved player class with "AirPlay video stuff" built in – to which he replied "What if there's just a flag on the [standard] video player?" Bamp! He had something going there, and here it is – if you don't know what to do with this, DO NOT USE IT. In fact, just to be safe, don't use it no matter what, hacking is for crazies!

Advertisement

self.movieController = [[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:CINDY_PATH]] autorelease];

[movieController setAllowsWirelessPlayback:YES];

movieController.view.frame = self.view.bounds;

[self.view addSubview:movieController.view];

[Via TUAW]

Recommended

Advertisement