-1

I have a problem with MPMoviePlayerController in iPhone device. It is playing in my iPhone device without clarity(cant see the video content properly ). However It is playing in my simulator properly.

Can any one tell me a way to fix this problem..

Mehul Mistri
  • 15,037
  • 14
  • 70
  • 94
Vipin
  • 4,718
  • 12
  • 54
  • 81

1 Answers1

0

Use this code

NSString *filepath = [[NSBundle mainBundle] pathForResource:@"aaa" ofType:@"mp4"];  
NSURL *fileURL = [NSURL fileURLWithPath:filepath];  
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL]; 
[moviePlayerController.view setFrame:CGRectMake(0, 70, 320, 270)]; 
[self.view addSubview:moviePlayerController.view];  
moviePlayerController.fullscreen = YES;  
[moviePlayerController play];
Mehul Mistri
  • 15,037
  • 14
  • 70
  • 94