简体   繁体   中英

iOS : detect the movie aspect ratio

I am developing a DRM video player using AVPlayer and AVPlayerItem that can play either streamed or plain file movies.

I want to know if it is possible to detect the aspect ratio of the movie so that I can do some pan in / pan out to play the movie with or without the eventual black stripes.

I had a look at CoreMedia Framework, but the is not any real good documentation as most of the methods are not explained.

Do any of you guys have any idea?

Thanks.

实际上,这非常简单:只需使用AVPLayer的videoGravity即可解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM