Why does my MPMoviePlayerController disappear when I press play?

Posted by Digital Robot on Stack Overflow See other posts from Stack Overflow or by Digital Robot
Published on 2010-12-23T14:54:23Z Indexed on 2010/12/24 14:54 UTC
Read the original article Hit count: 293

Filed under:

I have a MPMoviePlayerController in a view, something like

myMovie = [[MPMoviePlayerController alloc] initWithContentURL:URLfilme];
if (myMovie) {

    [myMovie setRepeatMode:MPMovieRepeatModeNone];
    [myMovie setShouldAutoplay: NO];
    [myMovie setScalingMode:MPMovieScalingModeAspectFit];
    myMovie.view.frame = vFilme.bounds;
    [vFilme addSubview:[myMovie view]];
}

The movie appears fine, I can scrub it, but when I press play, boooom, it vanishes.

I have tried to retain myMovie but nothing changed.

I have tried to play a video fullscreen and even using MPMoviePlayerViewController and is still disappears once I tap on play.

Even the video player sample by Apple is not working. Is this a bug or what?


EDIT


Things are getting more interesting. If instead of playing the video manually by tapping on the play button I insert two timers, one to play the video and another one to pause it after 3 seconds, what I see is this: when the play is fired the video disappears and when the pause is fired the video reappears but when it does it has no controls. It is totally frozen, but the app continues to run normally.

It is not anything related to video encoding, because I have tried with different videos, including one shot on the iPhone 4 and another shot on 3GS.

© Stack Overflow or respective owner

Related posts about iphone