Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by albicelestial for MPMoviePlayerViewController backgrounding deal. How to continue playing after returning from background to foreground?

I solved the problem.

Method -willEnterBackground should look like:

- (void)willEnterBackground {    if (player) {        playbackTime = player.moviePlayer.currentPlaybackTime;        [self dismissModalViewControllerAnimated:NO];    }}

We have to dismiss MPMoviePlayerViewController manually when app is entering background mode.Pay attention to use only

[self dismissModalViewControllerAnimated:NO];

instead of

[self dismissMoviePlayerViewControllerAnimated];

Thats because MPMoviePlayerViewController was shown with

[self presentModalViewController:player animated:YES];

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>