MPMoviePlayerViewController problem with presentMoviePlayerViewControllerAnimated

the problem is that if the movie is finished, the exitMoviePlayerViewController function is called automatically. This means that the MoviePlayerViewController is disappearing, but I want it to be on the screen if the movie is over, and only the "Finish" button should execute the dismissal ...

here is my code:

- (void) buttonTapped:(id)sender {
 NSURL *url = [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:@"dishes" ofType:@"mov"]];
 MPMoviePlayerViewController *movViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];

 [url release];
 if(movViewController) {
  [movViewController.moviePlayer setShouldAutoplay:NO];
  [self presentMoviePlayerViewControllerAnimated:movViewController];
 }
}

Even [movViewController.moviePlayer setShouldAutoplay: NO]; doing nothing.

Thanks for responding xnz

+3
source share
1 answer

, , , . , "", . , . , -, - , "" .

0

Source: https://habr.com/ru/post/1784946/


All Articles