views:

928

answers:

3

i have downloaded the iphone MoviePlayer sample code from iphone developer center,but when i add a action [mMoviePlayer stop] at overlay button there, the screen keep blinking when i playback the movieplayer, is anyone met this problem?

+2  A: 

Are you talking about the "Done" button which comes up when you tap the player? You do not need to write any code for that. As soon as you press the Done button, the moviePlaybackDidFinishCallback is called and the playback stops.

In case it is not the Done button you are talking about, which overlay button's action are you specifying?

lostInTransit
A: 

i have tried two methods, one is the press the Done button come with the movie player, another is the press overlay button and add action [mMoviePlayer stop] there,however,both come the same result, when i replay the movie again, the screen keep blinking

issac
A: 
self.moviePlayer.initialPlaybackTime = -1.0;

Try this in the media player code before calling the play function. In my code, i kept it in -(void)setMoviePlayerUserSettings function. this is a bug that shows up in simulators. Try to check it with the default movie player application from sample codes of apple. Click on the local movie. In the middle of video, press done. Again click on the play button. U will see the video flickering. The above setting makes it proper.

Nareshkumar