mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-07 05:02:56 +00:00
30 lines
667 B
Objective-C
30 lines
667 B
Objective-C
|
|
#import <AsyncDisplayKit/AsyncDisplayKit.h>
|
|
|
|
typedef NS_ENUM(NSUInteger, ASVideoGravity) {
|
|
ASVideoGravityResizeAspect,
|
|
ASVideoGravityResizeAspectFill,
|
|
ASVideoGravityResize
|
|
};
|
|
|
|
// set up boolean to repeat video
|
|
// set up delegate methods to provide play button
|
|
// tapping should play and pause
|
|
|
|
@interface ASVideoNode : ASDisplayNode
|
|
@property (nonatomic) NSURL *URL;
|
|
@property (nonatomic) BOOL shouldRepeat;
|
|
@property (nonatomic) ASVideoGravity gravity;
|
|
|
|
- (instancetype)initWithURL:(NSURL *)URL;
|
|
- (instancetype)initWithURL:(NSURL *)URL videoGravity:(ASVideoGravity)gravity;
|
|
|
|
- (void)play;
|
|
- (void)pause;
|
|
|
|
@end
|
|
|
|
@protocol ASVideoNodeDelegate <NSObject>
|
|
|
|
@end
|