-
Notifications
You must be signed in to change notification settings - Fork 146
contentMode
isExist? edited this page Sep 21, 2016
·
3 revisions
视频画面的显示模式,如无缩放,同比适配,满屏填充等效果
typedef NS_ENUM(NSInteger, MPMovieScalingMode) {
MPMovieScalingModeNone,
MPMovieScalingModeAspectFit,
MPMovieScalingModeAspectFill,
MPMovieScalingModeFill
};
- MPMovieScalingModeNone — 无缩放
- MPMovieScalingModeAspectFit — 同比适配,某个方向会有黑边
- MPMovieScalingModeAspectFill — 同比填充,某个方向的显示内容可能被裁剪
- MPMovieScalingModeFill — 满屏填充,与原始视频比例不一致
通过scalingMode属性来设置/获取当前所放模式,播放前或者播放中设置均生效。
_player.scalingMode = MPMovieScalingModeAspectFit;