After calling -
[self.navigationController presentMoviePlayerViewControllerAnimated:movieViewController];
The view dismisses itself after screen lock or backgrounding. Is there anyway to prevent this?
After calling -
[self.navigationController presentMoviePlayerViewControllerAnimated:movieViewController];
The view dismisses itself after screen lock or backgrounding. Is there anyway to prevent this?
It appears that locking the screen causes MPMoviePlayerController
to stop, which causes MPMoviePlayerViewController
to dismiss.
I ended up rolling my own custom UIViewController
with MPMoviePlayerController
taking up the entire view with full screen controls.
Try below this post screen lock event in iphone sdk
after trying lock event to dismiss mpmovieplayerviewcontroller!
thanks!
It will be the natural behavior of the device .. Unless >> you add the permission for it.
Info.plist > Required background modes
add mode App plays audio or streams audio/video using AirPlay
Now difference will be that the MPMoviePlayerViewController
will not dismiss, even after the app goes to background. But the video will pause.