0

Using a MPMoviePlayerController to play a video, with

[player setScalingMode: MPMovieScalingModeAspectFill];

both the top part and the bottom part of the video are clipped, but I want it top aligned and only keep the upper part, any solutions? enter image description here p.s. I found this post, but it's answer didn't suit me, cause it didn't clip the video but my player do not occupy the screen.

Thanks for help :)

Community
  • 1
  • 1
weiwen
  • 446
  • 6
  • 16

1 Answers1

0

MPMoviePlayer is Deprecated, you should use AVPlayerViewController https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/

This SO has an Obj-c example: How to play video with AVPlayerViewController (AVKit) in Swift

Community
  • 1
  • 1
KevinS
  • 598
  • 4
  • 18