mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-06-19 17:43:23 +08:00
ASVideoNode public methods proxy
This commit is contained in:
@@ -37,7 +37,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (instancetype)initWithAsset:(AVAsset*)asset;
|
||||
|
||||
#pragma mark - Public API
|
||||
-(void)seekToTime:(CGFloat)percentComplete;
|
||||
- (void)seekToTime:(CGFloat)percentComplete;
|
||||
- (void)play;
|
||||
- (void)pause;
|
||||
- (BOOL)isPlaying;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -398,7 +398,8 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
||||
[self seekToTime:percentage];
|
||||
}
|
||||
|
||||
-(void)seekToTime:(CGFloat)percentComplete
|
||||
#pragma mark - Public API
|
||||
- (void)seekToTime:(CGFloat)percentComplete
|
||||
{
|
||||
CGFloat seconds = ( CMTimeGetSeconds(_duration) * percentComplete ) / 100;
|
||||
|
||||
@@ -410,6 +411,21 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)play
|
||||
{
|
||||
[_videoNode play];
|
||||
}
|
||||
|
||||
- (void)pause
|
||||
{
|
||||
[_videoNode pause];
|
||||
}
|
||||
|
||||
- (BOOL)isPlaying
|
||||
{
|
||||
return [_videoNode isPlaying];
|
||||
}
|
||||
|
||||
- (NSArray *)controlsForLayoutSpec
|
||||
{
|
||||
NSMutableArray *controls = [[NSMutableArray alloc] initWithCapacity:_cachedControls.count];
|
||||
|
||||
Reference in New Issue
Block a user