diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGCameraCapturedVideo.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGCameraCapturedVideo.h index a9031abd86..724895304a 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGCameraCapturedVideo.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGCameraCapturedVideo.h @@ -13,7 +13,7 @@ @property (nonatomic, readonly) bool isAnimation; @property (nonatomic, readonly) TGMediaAsset *originalAsset; @property (nonatomic, readonly) CGSize dimensions; - +@property (nonatomic, readonly) NSString *uniformTypeIdentifier; - (instancetype)initWithURL:(NSURL *)url; - (instancetype)initWithAsset:(TGMediaAsset *)asset livePhoto:(bool)livePhoto; diff --git a/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m b/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m index f33b10a365..c8a9f6ee35 100644 --- a/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m +++ b/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m @@ -88,6 +88,11 @@ return _cachedAVAsset; } +- (NSString *)uniformTypeIdentifier +{ + return nil; +} + - (SSignal *)avAsset { if (_originalAsset != nil) { if (_cachedAVAsset != nil) { diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m index 24c07a0634..12ee190c90 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m @@ -1107,7 +1107,11 @@ } else if (self.item.avAsset != nil) { itemSignal = [self.item.avAsset mapToSignal:^SSignal *(AVAsset *avAsset) { - return [SSignal single:[AVPlayerItem playerItemWithAsset:avAsset]]; + if ([avAsset isKindOfClass:[AVAsset class]]) { + return [SSignal single:[AVPlayerItem playerItemWithAsset:avAsset]]; + } else { + return [SSignal never]; + } }]; } diff --git a/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m b/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m index f0afb18ed1..b8ec8db47a 100644 --- a/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m +++ b/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m @@ -108,6 +108,9 @@ + (SSignal *)convertAVAsset:(AVAsset *)avAsset adjustments:(TGMediaVideoEditAdjustments *)adjustments watcher:(TGMediaVideoFileWatcher *)watcher inhibitAudio:(bool)inhibitAudio entityRenderer:(id)entityRenderer { + if ([avAsset isKindOfClass:[NSURL class]]) { + avAsset = [[AVURLAsset alloc] initWithURL:(NSURL *)avAsset options:nil]; + } SQueue *queue = [[SQueue alloc] init]; return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber) diff --git a/submodules/TelegramCore/Sources/SyncCore/SyncCore_Namespaces.swift b/submodules/TelegramCore/Sources/SyncCore/SyncCore_Namespaces.swift index ee6328cdb9..013a48fca5 100644 --- a/submodules/TelegramCore/Sources/SyncCore/SyncCore_Namespaces.swift +++ b/submodules/TelegramCore/Sources/SyncCore/SyncCore_Namespaces.swift @@ -74,10 +74,10 @@ public struct Namespaces { public static let cachedPollResults: Int8 = 9 public static let cachedContextResults: Int8 = 10 public static let proximityNotificationStoredState: Int8 = 11 - public static let cachedPeerInvitationImporters: Int8 = 12 - public static let cachedPeerExportedInvitations: Int8 = 13 public static let cachedGroupCallDisplayAsPeers: Int8 = 14 public static let cachedAdMessageStates: Int8 = 15 + public static let cachedPeerInvitationImporters: Int8 = 16 + public static let cachedPeerExportedInvitations: Int8 = 17 } public struct UnorderedItemList {