mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-29 09:01:05 +00:00
Fix camera video sending
This commit is contained in:
parent
5ffff6fc84
commit
08f9a952be
@ -2709,11 +2709,12 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus
|
|||||||
CGSize dimensions = [TGMediaVideoConverter dimensionsFor:asset.originalSize adjustments:adjustments preset:preset];
|
CGSize dimensions = [TGMediaVideoConverter dimensionsFor:asset.originalSize adjustments:adjustments preset:preset];
|
||||||
NSTimeInterval duration = adjustments.trimApplied ? (adjustments.trimEndValue - adjustments.trimStartValue) : video.videoDuration;
|
NSTimeInterval duration = adjustments.trimApplied ? (adjustments.trimEndValue - adjustments.trimStartValue) : video.videoDuration;
|
||||||
|
|
||||||
[signals addObject:[thumbnailSignal map:^id(UIImage *image)
|
[signals addObject:[thumbnailSignal mapToSignal:^id(UIImage *image)
|
||||||
{
|
{
|
||||||
|
return [video.avAsset map:^id(AVURLAsset *avAsset) {
|
||||||
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
|
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
|
||||||
dict[@"type"] = @"cameraVideo";
|
dict[@"type"] = @"cameraVideo";
|
||||||
// dict[@"url"] = video.avAsset.URL;
|
dict[@"url"] = avAsset.URL;
|
||||||
dict[@"previewImage"] = image;
|
dict[@"previewImage"] = image;
|
||||||
dict[@"adjustments"] = adjustments;
|
dict[@"adjustments"] = adjustments;
|
||||||
dict[@"dimensions"] = [NSValue valueWithCGSize:dimensions];
|
dict[@"dimensions"] = [NSValue valueWithCGSize:dimensions];
|
||||||
@ -2728,6 +2729,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus
|
|||||||
|
|
||||||
id generatedItem = descriptionGenerator(dict, caption, entities, nil);
|
id generatedItem = descriptionGenerator(dict, caption, entities, nil);
|
||||||
return generatedItem;
|
return generatedItem;
|
||||||
|
}];
|
||||||
}]];
|
}]];
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user