I use MPMoviePlayerViewController
to playback videos in my iOS app on iPhone4 (iOS5.1), new iPad (iOS5.1), iPad (iOS4.2).
I press home button twice when playing a video, the multitask dock shows and player pauses.
I have tried to call player's play
method in appDelegate applicationWillResignActive
,but it didn't work.
Does anyone know how to do to avoid player pause ?
Another question, how to show video's title on remote control panel? (swipe multitask dock to leftmost).
Thanks.
I don't think you shouldn't continue playing the video. According to Apple App Programming Guide, you are supposed to pause visual activity in the application when that happens. I am not 100% sure if the App Store submission will accept that behavior.
You can show the video title by providing metadata to the
MPNowPlayingInfoCenter
:See Here
As written there: