1

代码 :

   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 帧,从而产生断断续续的效果......

有任何想法吗 ?

4

1 回答 1

0

试试这个代码:

movieplayer.initialPlaybackTime = -1;

为我工作!也许这不是同一个问题,但似乎它可能会有所帮助。

祝你好运。

于 2009-11-22T23:04:30.110 回答