mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
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.
This commit is contained in:
@@ -14,12 +14,26 @@
|
||||
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user