代码 :
NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4v"];
MPMoviePlayerController *video = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
[video setBackgroundColor:[UIColor blackColor]];
video.scalingMode = MPMovieScalingModeAspectFill;
[[ NSNotificationCenter defaultCenter ] addObserver: self selector: @selector(movieFinishedCallback:) name: MPMoviePlayerPlaybackDidFinishNotification object: aVideo ];
[video play];
....movieFinishedCallback...
[video release];
结果 :
影片从第 10 帧开始,然后重置到第 0 帧,从而产生断断续续的效果......
有任何想法吗 ?