ASVideoNode public methods proxy

This commit is contained in:
Erekle
2016-05-13 02:14:12 +04:00
parent db95771b33
commit 658d376d7b
2 changed files with 21 additions and 2 deletions

View File

@@ -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

View File

@@ -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];