views:

268

answers:

1

Code :

   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];

Result :

Movie starts at frame 10 and then resets to frame 0, creating a stutter effect...

Any Ideas ?

A: 

Try this code:

movieplayer.initialPlaybackTime = -1;

Worked for me! Maybe it wasn't the same problem, but it seems it might help.

Good luck.

Brian