added delegate method for video did finish, moved layer creation to after view displays, rearranged spinner logic, added tests

This commit is contained in:
Luke Parham
2015-12-22 15:34:11 -06:00
parent e318285089
commit 6dc15ffd44
5 changed files with 194 additions and 85 deletions

View File

@@ -11,7 +11,7 @@
#import "ViewController.h"
@interface ViewController()
@interface ViewController()<ASVideoNodeDelegate>
@property (nonatomic) ASVideoNode *videoNode;
@end
@@ -51,6 +51,8 @@
{
ASVideoNode *nicCageVideo = [[ASVideoNode alloc] init];
nicCageVideo.delegate = self;
nicCageVideo.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"http://files.parsetfss.com/8a8a3b0c-619e-4e4d-b1d5-1b5ba9bf2b42/tfss-753fe655-86bb-46da-89b7-aa59c60e49c0-niccage.mp4"]];
nicCageVideo.frame = CGRectMake([UIScreen mainScreen].bounds.size.width/2, [UIScreen mainScreen].bounds.size.height/3, [UIScreen mainScreen].bounds.size.width/2, [UIScreen mainScreen].bounds.size.height/3);
@@ -102,4 +104,9 @@
return YES;
}
- (void)videoDidReachEnd:(ASVideoNode *)videoNode
{
//Do something with your video if you so desire.
}
@end