steipete steipete - 1 year ago 140
iOS Question

Equivalent of MPMovieScalingMode in AVPlayer?

With MPMoviePlayerControllers's, scaling a movie is easy with setting MPMovieScalingMode. (like MPMovieScalingModeFill, MPMovieScalingModeAspectFill)

With AVPlayer/AVPlayerLayer I can't seem to find anything like that. Do I have to do this myself? If so, how do I start on this?

Answer Source

Take a look at videoGravity property in AVPlayerLayer, looks like it is what you need.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download