1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-03 09:57:46 +01:00
Telegram/Telegraph/TGMediaPickerAsset.h
2015-10-01 19:19:52 +03:00

44 lines
1.4 KiB
Objective-C

#import <Foundation/Foundation.h>
@class PHAsset;
@class ALAsset;
typedef enum {
TGMediaPickerAssetAnyType,
TGMediaPickerAssetPhotoType,
TGMediaPickerAssetVideoType
} TGMediaPickerAssetType;
typedef enum {
TGMediaPickerAssetSubtypeNone = 0,
TGMediaPickerAssetSubtypePhotoPanorama = (1UL << 0),
TGMediaPickerAssetSubtypePhotoHDR = (1UL << 1),
TGMediaPickerAssetSubtypeVideoStreamed = (1UL << 16),
TGMediaPickerAssetSubtypeVideoHighFrameRate = (1UL << 17),
TGMediaPickerAssetSubtypeVideoTimelapse = (1UL << 18)
} TGMediaPickerAssetSubtype;
@interface TGMediaPickerAsset : NSObject
@property (nonatomic, readonly) NSString *persistentId;
@property (nonatomic, readonly) NSURL *url;
@property (nonatomic, readonly) CGSize dimensions;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, readonly) bool isVideo;
@property (nonatomic, readonly) NSTimeInterval videoDuration;
@property (nonatomic, readonly) NSTimeInterval actualVideoDuration;
@property (nonatomic, readonly) bool representsBurst;
@property (nonatomic, readonly) TGMediaPickerAssetType type;
@property (nonatomic, readonly) TGMediaPickerAssetSubtype subtypes;
@property (nonatomic, readonly) PHAsset *backingAsset;
@property (nonatomic, readonly) ALAsset *backingLegacyAsset;
- (instancetype)initWithPHAsset:(PHAsset *)asset;
- (instancetype)initWithALAsset:(ALAsset *)asset;
- (NSString *)uniqueId;
@end