Apple provides good documentation on media infrastructure in its documents.
Search for MPMoviePlayerController. The following code example plays a movie at a URL. (disclaimer, this code is removed from Apple).
-(void)playMovieAtURL:(NSURL*)theURL { MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContentURL:theURL]; theMovie.scalingMode=MPMovieScalingModeAspectFill; theMovie.userCanShowTransportControls=NO;
source share