mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-17 09:10:30 +00:00
* 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.
40 lines
945 B
Objective-C
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
|