Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPMoviePlayerController, disallow fullscreen but allow navigation through clip?

I have a video in my iPad app, but I dont want it to be able to go to fullscreen. However I do potentially want the user to be able to navigate 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 that you give the user: None, Embedded, or Fullscreen.

None gives the user no control. Embedded and Fullscreen basically give the use the same amount of control but just start in different states.

Basically what I want is Embedded with the switch to Fullscreen option taken out.

Anybody know if its possible? Thanks

like image 774
funckymonk Avatar asked Jul 13 '10 07:07

funckymonk


1 Answers

You can set the controls style to "None", and then add your own custom view to navigate using a UISlider (I've done this in the past).

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

You'll also need an NSTimer or KVO to monitor the playback time so it can update the slider UI element in realtime.

like image 105
makdad Avatar answered Oct 10 '22 01:10

makdad