mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
fix video view
This commit is contained in:
parent
9f0689f297
commit
f5490e29c3
2 changed files with 7 additions and 7 deletions
|
|
@ -187,6 +187,7 @@
|
|||
else if (localVideo) {
|
||||
if (_messageImageView.image == nil) {
|
||||
[self loadFirstImage:localVideo type:PHAssetMediaTypeVideo];
|
||||
_imageGestureRecognizer.enabled = NO;
|
||||
}
|
||||
}
|
||||
else if (localFile) {
|
||||
|
|
|
|||
|
|
@ -356,17 +356,16 @@ static const CGFloat CELL_MESSAGE_Y_MARGIN = 52; // 44;
|
|||
if(localFile) {
|
||||
CGSize fileSize = CGSizeMake(200, 80);
|
||||
size = [self getMediaMessageSizefromOriginalSize:fileSize withWidth:width];
|
||||
} else if (localVideo) {
|
||||
//TODO
|
||||
CGSize videoSize = CGSizeMake(320, 240);
|
||||
size = [self getMediaMessageSizefromOriginalSize:videoSize withWidth:width];
|
||||
size.height += CELL_MESSAGE_X_MARGIN;
|
||||
} else {
|
||||
if (!localImage) {
|
||||
if (!localImage && !localVideo) {
|
||||
//We are loading the image
|
||||
return CGSizeMake(CELL_MIN_WIDTH + CELL_MESSAGE_X_MARGIN, CELL_MIN_HEIGHT + CELL_MESSAGE_Y_MARGIN);
|
||||
}
|
||||
PHFetchResult<PHAsset *> *assets = [PHAsset fetchAssetsWithLocalIdentifiers:[NSArray arrayWithObject:localImage] options:nil];
|
||||
PHFetchResult<PHAsset *> *assets;
|
||||
if(localImage)
|
||||
assets = [PHAsset fetchAssetsWithLocalIdentifiers:[NSArray arrayWithObject:localImage] options:nil];
|
||||
else
|
||||
assets = [PHAsset fetchAssetsWithLocalIdentifiers:[NSArray arrayWithObject:localVideo] options:nil];
|
||||
if (![assets firstObject]) {
|
||||
return CGSizeMake(CELL_MIN_WIDTH, CELL_MIN_HEIGHT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue