Hi white screen is showing if video is not in supported list. and there is no way user to go back to previous screen(navigation bar too not showing).and when i initialize the MPMoviePlayerController their retain count is increasing to 4.
here is my code
mMPMovieViewCont=[[MPMoviePlayerViewController alloc]initWithContentURL:theURL];
[theURL release];
theURL=nil;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieDidFinishForOS4:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[self.navigationController presentMoviePlayerViewControllerAnimated:mMPMovieViewCont];
NSLog(@"%d",[mMPMovieViewCont retainCount]); //**here count is 4**
- (void) movieDidFinishForOS4:(NSNotification*)notification {
mMPMovieViewCont.moviePlayer.initialPlaybackTime=-1.0;
[mMPMovieViewCont dismissMoviePlayerViewControllerAnimated];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
NSLog(@"%d",[mMPMovieViewCont retainCount]); //returning 3
[mMPMovieViewCont release];
mMPMovieViewCont = nil;
i am using ios4.2
Do not call retainCount. It is useless in production and misleading for debugging.
The retain count is entirely irrelevant to your question, it would seem. I'm not sure I understand exactly what "Hi white screen is showing if video is not in supported list" means, but it sounds like you need to check to see if the video is compatible with the device or on the approved playlist before you start playback?
精彩评论