MPMoviePlayerController, prohibit full-screen mode, but allow navigation through the clip?

I have a video in my iPad app, but I don’t want it to be able to switch to full screen mode. However, I really want the user to be able to go to the part of the video that they want to see.

As far as I can tell, there are only three options for the controls you give the user: None, Embedded, or Fullscreen.

No one gives the user any control. The built-in and full-screen modes basically give the same amount of control, but just start in different states.

Basically, what I want is built-in with the switch outputting to full-screen mode.

Does anyone know if this is possible? Thanks

+7
ipad movie mpmovieplayercontroller
source share
1 answer

You can set the control style to β€œNo,” and then add your own custom view for navigation using UISlider (I have done this in the past).

MPMoviePlayerController adheres to the MPMediaPlayback protocol, so you take the total playing time of the movie, multiply it by the UISlider value (when changing it) and then adjust the position of the playback head.

You will also need NSTimer or KVO to control playback time so that it can update the slider user interface element in real time.

+2
source share

All Articles