Swiftgram/AsyncDisplayKit/ASVideoPlayerNode.h
Erekle 52b40f8004 ASVideoPlayerNodeControlType and fixes
* changed static string to ASVideoPlayerNodeControlType
* public property for duration
* public method for seek
* new _controlFlexGrowSpacerSpec; used to use flexible space in
controlbar. for example if user does not want to have scrubber, he can
replace it with flexible spacer and duration text node will be kept at
the right edge.
2016-05-10 23:57:47 +04:00

40 lines
945 B
Objective-C

//
// ASVideoPlayerNode.h
// AsyncDisplayKit
//
// Created by Erekle on 5/6/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#if TARGET_OS_IOS
#import <AsyncDisplayKit/AsyncDisplayKit.h>
//#import <AsyncDisplayKit/ASThread.h>
//#import <AsyncDisplayKit/ASVideoNode.h>
//#import <AsyncDisplayKit/ASDisplayNode+Subclasses.h>
@class AVAsset;
typedef enum {
ASVideoPlayerNodeControlTypePlaybackButton,
ASVideoPlayerNodeControlTypeElapsedText,
ASVideoPlayerNodeControlTypeDurationText,
ASVideoPlayerNodeControlTypeScrubber,
ASVideoPlayerNodeControlTypeFlexGrowSpacer,
} ASVideoPlayerNodeControlType;
NS_ASSUME_NONNULL_BEGIN
@interface ASVideoPlayerNode : ASDisplayNode
@property (nonatomic,assign,readonly) CGFloat duration;
- (instancetype)initWithUrl:(NSURL*)url;
- (instancetype)initWithAsset:(AVAsset*)asset;
#pragma mark - Public API
-(void)seekToTime:(CGFloat)percentComplete;
@end
NS_ASSUME_NONNULL_END
#endif