mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-09 14:10:05 +00:00
31 lines
822 B
Objective-C
31 lines
822 B
Objective-C
|
|
#import <AsyncDisplayKit/AsyncDisplayKit.h>
|
|
|
|
typedef NS_ENUM(NSUInteger, ASVideoGravity) {
|
|
ASVideoGravityResizeAspect,
|
|
ASVideoGravityResizeAspectFill,
|
|
ASVideoGravityResize
|
|
};
|
|
|
|
@interface ASVideoNode : ASDisplayNode<_ASDisplayLayerDelegate>
|
|
@property (atomic, strong, readwrite) AVAsset *asset;
|
|
@property (nonatomic, assign, readwrite) BOOL shouldAutoPlay;
|
|
@property (atomic) ASVideoGravity gravity;
|
|
@property (atomic) BOOL autorepeat;
|
|
@property (atomic) ASButtonNode *playButton;
|
|
|
|
- (void)play;
|
|
- (void)pause;
|
|
|
|
@end
|
|
|
|
@protocol ASVideoNodeDelegate <NSObject>
|
|
@end
|
|
|
|
@protocol ASVideoNodeDatasource <NSObject>
|
|
@optional
|
|
- (ASDisplayNode *)playButtonForVideoNode:(ASVideoNode *) videoNode;
|
|
- (UIImage *)thumbnailForVideoNode:(ASVideoNode *) videoNode;
|
|
- (NSURL *)thumbnailURLForVideoNode:(ASVideoNode *)videoNode;
|
|
@end
|