I am using the MPMoviePlayerController
to play the video files in my application, videos are playing nice. But suddenly I opened one file and the MPMoviePlayerController
opens in complete black screen, no controls are there. But I can see that there is a problem in my file and I resolved it.
I wonder is there any event that will be sent like MPMoviePlayerDidExitFullscreenNotification
for these black screen issue. I tried with MPMovieSourceTypeUnknown
event which seems to be not correct and tried with many events.
Now I want to know , is there any event will be sent , when the MPMoviePlayerController
trying to open a file which results in black screen.
The documentations are fairly descriptive, though I will assume a black screen is a loading error:
MPMovieFinishReason
Constants describing the reason that playback ended.
enum
{
MPMovieFinishReasonPlaybackEnded,
MPMovieFinishReasonPlaybackError,
MPMovieFinishReasonUserExited
};
typedef NSInteger MPMovieFinishReason;
Constants:
MPMovieFinishReasonPlaybackEnded The end of the movie was reached. Available in iOS 3.2 and later. Declared in MPMoviePlayerController.h.
MPMovieFinishReasonPlaybackError There was an error during playback. Available in iOS 3.2 and later. Declared in MPMoviePlayerController.h.
MPMovieFinishReasonUserExited The user stopped playback. Available in iOS 3.2 and later. Declared in MPMoviePlayerController.h.
These are passed through the MPMoviePlayerPlaybackDidFinishNotification
notification with the MPMoviePlayerPlaybackDidFinishReasonUserInfoKey
key.