iphone - MPMediaPlayerController frame problem -


actually want play video in small area of self.view or first time when video play video's visible area occupy small part , other black area of video goes out of boundary of small area. code

 -(void)animatevideompmediaplayer:(nsstring *)strvideoname{      //self.navigationitem.hidesbackbutton  = true;      // register receive notification when movie has finished playing.      nsstring *path = [[nsbundle mainbundle] pathforresource:strvideoname oftype:@"mp4" indirectory:nil];      nsurl *ur= [nsurl fileurlwithpath:path];     nslog(@"hello %@",ur);      if(mediaplayer)         [mediaplayer release];      mediaplayer = [[mpmovieplayercontroller alloc] initwithcontenturl:ur];      //mediaplayer.fullscreen = yes;      //mediaplayer.scalingmode = mpmoviescalingmodeaspectfill;      videoplayer.scalingmode=mpmoviescalingmodefill;      [mediaplayer setcontrolstyle:mpmoviecontrolstylenone];      //[mediaplayer setmoviecontrolmode:mpmoviecontrolmodehidden];      mediaplayer.view.frame = cgrectmake(4,362,102 ,100);      //mediaplayer.view.bounds = cgrectmake(4,362,102 ,100);       [self.view addsubview:mediaplayer.view];      mediaplayer.view.frame = cgrectmake(4,362,102 ,100);      [mediaplayer setrepeatmode:mpmovierepeatmodeone];     [mediaplayer play];     // [self performselector:@selector(stopvideoplease:) withobject:mediaplayer afterdelay:5];   } 


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -