Could someone help me build this iPhone app (I have the code)?

MichaelKotlan

New member
Joined
Sep 30, 2011
Messages
0
Reaction score
0
Points
0
I want an iPhone app that plays a fullscreen video on startup with no video controls and no response to touch. I don't want it on the app store, so you don't need a $99 developer account. However, you will have to have your iPhone SDK modified to create jailbroken apps. You can find out how here: http://www.alexwhittemore.com/?p=354. If you don't want to do this, it would be great if you could guide me through building it on my own computer. Anyway, I've managed to get the code for this:


- (IBAction) videoAction:(id)sender
{
**if (myMovie)
** *return ;
**
**NSString* a_path = [[NSBundle mainBundle] pathForResource:@"kevin-kell-introduction" ofType: @"mp4"];
**
**if (a_path==nil)
** *return ;
**
**NSURL* a_url = [NSURL fileURLWithPath:a_path];
**
**if (a_url==nil)
** *return ;
**
**Class moviePlayerViewControllerClass = (NSClassFromString(@"MPMoviePlayerViewController"));
**newStyleVideoPlayer = moviePlayerViewControllerClass && [MPMoviePlayerViewController instancesRespondToSelector: @selector(presentMoviePlayerViewControllerAnimated:)];
**if (newStyleVideoPlayer)
**{
** *//We're running in iOS 3.2 or later, so use the new MPMoviePlayerViewController class.
** *
** *MPMoviePlayerViewController* movie_controller = [[[MPMoviePlayerViewController alloc] initWithContentURL:a_url] autorelease];
** *
** *if (movie_controller) {
** * *self.myMovie = movie_controller;
** * *
** * *[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playBackFinished:) name:@"MPMoviePlayerPlaybackDidFinishNotification" object:nil];
** * *
** * *MPMoviePlayerController* theMoviewPlayer = movie_controller.moviePlayer;
** * *theMoviewPlayer.controlStyle = MPMovieControlStyleNone;
** * *//theMoviewPlayer.fullscreen = TRUE;
** * *
** * *[[UIApplication sharedApplication] setStatusBarHidden: TRUE withAnimation: UIStatusBarAnimationNone];
** * *[self presentMoviePlayerViewControllerAnimated: (MPMoviePlayerViewController*)self.myMovie];
** *}
**}
}




I just don't know how to apply it. Could someone help me through the process, or better yet, do it for me?
 
Back
Top