0

Well.. basically that's what happens, when I play a movie from a game I have, only the sound plays, the video doesn't, showing a black screen, even the touch is disabled.

This is the relevant part of the code:

myMovie = [[MPMoviePlayerViewController alloc] initWithContentURL:[self movieURL]];

myMovie.moviePlayer.scalingMode = MPMovieScalingModeFill; myMovie.moviePlayer.controlStyle = MPMovieControlModeHidden;

[myMovie.moviePlayer play];

Thx.

Edit.: Ok, I got it working now, I needed to add this line of code:

[self presentMoviePlayerViewControllerAnimated:myMovie];

The problem now is, that I dont want to see the mediaplayer controls (pause, stop, etc), I just want to watch the video fullscreen, that's all, any ideas?

Artemix
  • 8,497
  • 14
  • 48
  • 75

1 Answers1

1

For me, it was adding these two lines from the MPMoviePlayerController documentation that are not in the MoviePlayer sample code app. So I was getting just audio when playing a stream in the sample app in both 4.1 and 4.2.

[[theMovie view] setFrame: [self.view bounds]];  // frame must match parent view
[self.view addSubview: [theMovie view]];
Doug McBride
  • 514
  • 1
  • 4
  • 13