Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
I am wanting to update an app that plays a video embedded in the app so that it can be played via airPlay to a new Apple TV. I have this:
Code:
- (IBAction)history {NSBundle *bundle = [NSBundle mainBundle];
	NSString *moviePath = [bundle pathForResource:@"restorationvoice" ofType:@"m4v"];
	NSURL  *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
	MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
	theMovie.scalingMode = MPMovieScalingModeAspectFill;
	theMovie.allowsAirPlay = YES;
	[theMovie play];
	MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
	[self presentMoviePlayerViewControllerAnimated:moviePlayer];
	
}
When I run the app, I see the airPlay icon and a list of my iPad and Apple TV, but when I select one, only audio. Any ideas?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.