开发者

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜