开发者

MPMoviePlayerController controls - remove fullscreen and aspect buttons?

The documentation shows 3 control styles:

MPMovieControlStyleNone,
MPMovieControlStyleEmbedded,
MPMovieControlStyleFullscreen,
MPMovieControlStyleDefa开发者_运维百科ult = MPMovieControlStyleFullscreen

I want the controls to mimic the kind found in Apple's "Videos" app, which do not have a fullscreen button or an aspect ratio button. None of the above do this. How do we achieve that?


Just looked for a similar solution (following up on a client request saying: "I want the same behavior than in Apple's app Videos").
Result of my research: It is not possible.

In fullscreen mode, you either:

  • show no control (and the user can't control the playing of the video)
  • show the controls when starting to play the video (and they automatically disappear after 5 seconds).

Apple has likely used a private API for this.


By iterating all MPMoviePlayerController subviews, then hide the full screen button stackoverflow.com/a/27482687/928599


Yes you can hide the full screen button. Use MPMovieControlStyleFullscreen with MPMovieScalingModeFill property. My example code is as under:

mpplayerObject.controlStyle = MPMovieControlStyleFullscreen;
[mpplayerObject setScalingMode:MPMovieScalingModeFill]; 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜