mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
added delegate method for video did finish, moved layer creation to after view displays, rearranged spinner logic, added tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user