I'm trying to play two videos continuously using MPMoviePlayer. I let the second video play when the MPMoviePlayerPlaybackDidFinishNotification
is posted.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playSecondMovie)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
The problem is when the first video stops, the view will go back to the previously view for a short while before play the next video.
Is there any idea about how to play video continuously or is it possible to get the image of the last frame in the first video?
I've made a walkaround to solve the problem. The major idea is to add a fullscreen black view over the previous view before the first movie plays. So when the first movie ends playing the full screen will be black (This looks more natural than the previous view).
Some more modifications:
1 Another problem is that when I hides the status bar, the area will be white. So I also set the window color to black color.
2 When all the video finishes playing, the previous view is shown and the view frame will not leave space for status bar. So I change the view's orgin y to 20 before the status bar appears.
Hope this helps those who meet the same problem.