mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-29 00:50:40 +00:00
Fix camera video sending
This commit is contained in:
parent
5ffff6fc84
commit
08f9a952be
@ -2709,25 +2709,27 @@ 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)
|
||||||
{
|
{
|
||||||
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
|
return [video.avAsset map:^id(AVURLAsset *avAsset) {
|
||||||
dict[@"type"] = @"cameraVideo";
|
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
|
||||||
// dict[@"url"] = video.avAsset.URL;
|
dict[@"type"] = @"cameraVideo";
|
||||||
dict[@"previewImage"] = image;
|
dict[@"url"] = avAsset.URL;
|
||||||
dict[@"adjustments"] = adjustments;
|
dict[@"previewImage"] = image;
|
||||||
dict[@"dimensions"] = [NSValue valueWithCGSize:dimensions];
|
dict[@"adjustments"] = adjustments;
|
||||||
dict[@"duration"] = @(duration);
|
dict[@"dimensions"] = [NSValue valueWithCGSize:dimensions];
|
||||||
|
dict[@"duration"] = @(duration);
|
||||||
if (adjustments.paintingData.stickers.count > 0)
|
|
||||||
dict[@"stickers"] = adjustments.paintingData.stickers;
|
if (adjustments.paintingData.stickers.count > 0)
|
||||||
if (timer != nil)
|
dict[@"stickers"] = adjustments.paintingData.stickers;
|
||||||
dict[@"timer"] = timer;
|
if (timer != nil)
|
||||||
else if (groupedId != nil && !hasAnyTimers)
|
dict[@"timer"] = timer;
|
||||||
dict[@"groupedId"] = groupedId;
|
else if (groupedId != nil && !hasAnyTimers)
|
||||||
|
dict[@"groupedId"] = groupedId;
|
||||||
id generatedItem = descriptionGenerator(dict, caption, entities, nil);
|
|
||||||
return generatedItem;
|
id generatedItem = descriptionGenerator(dict, caption, entities, nil);
|
||||||
|
return generatedItem;
|
||||||
|
}];
|
||||||
}]];
|
}]];
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user