mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-19 21:00:10 +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) {
|
||||
if ([videoGravity isEqualToString:AVLayerVideoGravityResizeAspect]) {
|
||||
return UIViewContentModeScaleAspectFit;
|
||||
} else if ([videoGravity isEqual:AVLayerVideoGravityResizeAspectFill]) {
|
||||
if ([videoGravity isEqualToString:AVLayerVideoGravityResizeAspectFill]) {
|
||||
return UIViewContentModeScaleAspectFill;
|
||||
} else {
|
||||
} else if ([videoGravity isEqualToString:AVLayerVideoGravityResize]) {
|
||||
return UIViewContentModeScaleToFill;
|
||||
} else {
|
||||
return UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user