I have a video which gets played in a MPMoviePlayerController. I have set the background color of the MPMoviePlayerController to clearColor.
In order to display the first frame of the given video, I am using a UIImageView below the MPMoviePlayerController to display the first frame.
When the user clicks on the play button, I remove the given image from the super view using the following code inside the method moviePlaybackStarted:
[imageView removeFromSuperview];
This I have put inside a Notification method, for which I have used the following code.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlaybackStarted:)
name:MPMoviePlayerPlaybackStateDidChangeNotification
object:self.videoPlayer];
The problem is that, when I remove the UIImage from the imageView object, there appears a black screen before the movie starts playing.
If I dont remove the imageView object from the superview, then that black screen does not appear. But I have to remove it from the superview.
Where should I remove the imageView from the superview so that I do not get the black screen before the video starts playing. Please help.