Adding video to an iPhone application -


how add video iphone app. using iphone sdk 3.2.5? dont see actual video can hear playing.

here code:

-(void) viewdidload{     nsbundle *bundle=[nsbundle mainbundle];     nsstring *moviepath = [bundle pathforresource:@"facebook" oftype:@"mp4"];     nsurl *movieurl=[[nsurl fileurlwithpath:moviepath] retain];     mpmovieplayercontroller *themovie = [[mpmovieplayercontroller alloc] initwithcontenturl:movieurl];     themovie.scalingmode = mpmoviescalingmodeaspectfill;     [themovie play];     [super viewdidload]; } 

you need set frame mpmovieplayercontroller , add view:

themovie.view.frame = cgrectmake(0.0, 0.0, 320.0, 480.0); [self.view addsubview:themovie.view]; 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -