mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-19 12:49:02 +00:00
Change ASContentModeFromVideoGravity's default to UIViewContentModeScaleAspectFit
This commit is contained in:
parent
b5c3b15069
commit
a2b03d6e90
@ -17,12 +17,12 @@ static BOOL ASAssetIsEqual(AVAsset *asset1, AVAsset *asset2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static UIViewContentMode ASContentModeFromVideoGravity(NSString *videoGravity) {
|
static UIViewContentMode ASContentModeFromVideoGravity(NSString *videoGravity) {
|
||||||
if ([videoGravity isEqualToString:AVLayerVideoGravityResizeAspect]) {
|
if ([videoGravity isEqualToString:AVLayerVideoGravityResizeAspectFill]) {
|
||||||
return UIViewContentModeScaleAspectFit;
|
|
||||||
} else if ([videoGravity isEqual:AVLayerVideoGravityResizeAspectFill]) {
|
|
||||||
return UIViewContentModeScaleAspectFill;
|
return UIViewContentModeScaleAspectFill;
|
||||||
} else {
|
} else if ([videoGravity isEqualToString:AVLayerVideoGravityResize]) {
|
||||||
return UIViewContentModeScaleToFill;
|
return UIViewContentModeScaleToFill;
|
||||||
|
} else {
|
||||||
|
return UIViewContentModeScaleAspectFit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user