mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-16 17:00:58 +00:00
32 lines
857 B
Objective-C
32 lines
857 B
Objective-C
|
|
#import <AsyncDisplayKit/AsyncDisplayKit.h>
|
|
|
|
typedef NS_ENUM(NSUInteger, ASVideoGravity) {
|
|
ASVideoGravityResizeAspect,
|
|
ASVideoGravityResizeAspectFill,
|
|
ASVideoGravityResize
|
|
};
|
|
|
|
@interface ASVideoNode : ASControlNode<_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;
|
|
@property (atomic) AVPlayer *player;
|
|
|
|
- (void)play;
|
|
- (void)pause;
|
|
|
|
@end
|
|
|
|
@protocol ASVideoNodeDelegate <NSObject>
|
|
@end
|
|
|
|
@protocol ASVideoNodeDataSource <NSObject>
|
|
@optional
|
|
- (ASButtonNode *)playButtonForVideoNode:(ASVideoNode *)videoNode;
|
|
- (UIImage *)thumbnailForVideoNode:(ASVideoNode *) videoNode;
|
|
- (NSURL *)thumbnailURLForVideoNode:(ASVideoNode *)videoNode;
|
|
@end
|