3

I've an application based on iOS4, with a:

MPMoviePlayerController

and this settings:

moviePlayerController.movieSourceType = MPMovieSourceTypeStreaming;
moviePlayerController.controlStyle = MPMovieControlStyleDefault;

Everything is working good, except that, when I present the MPMoviePlayerController view, it doesn't display controls until the video is pre-loaded.

I know in previous version of iOS (3.x), controls are displayed as soon as MPMoviePlayer is presented. Any chance to have this working in ioS4?

simone
  • 31
  • 2

2 Answers2

3

You have to use MPMoviePlayerViewController instead of MPMoviePlayerController.

Guillaume
  • 393
  • 2
  • 21
1

I'm working on a video player for iPad and I'm experiencing the same behavior. However, I don't think it's much of a problem since you can't control the video until it's loaded anyway.

What you can do is fake the existence of those controls, by setting the background view.

Here's what I do:

moviePlayerController.backgroundView.backgroundColor = [UIColor blackColor];

That just makes the background view black, but you could imagine adding a UIImageView as background view that shows disabled controls, or build real controls that actually do something.

Erik B
  • 40,889
  • 25
  • 119
  • 135
  • @simone I see that you are new on Stack Overflow, so I just wanted to inform you that you are supposed to accept the answer that helped you the most, by clicking on the green checkmark next to the answer. In addition to accepting you might want to upvote answers and questions that you like, by clicking on the uparrow. – Erik B Jun 22 '11 at 15:52