|
@@ -18,6 +18,7 @@
|
|
|
#import "ZFPlayerControlView.h"
|
|
|
#import "ZFPlayerConst.h"
|
|
|
#import "ZFUtilities.h"
|
|
|
+#import "lastFileManager.h"
|
|
|
|
|
|
|
|
|
@interface videoPlayByAVPlayerViewController ()
|
|
@@ -77,6 +78,11 @@
|
|
|
});
|
|
|
|
|
|
};
|
|
|
+
|
|
|
+ self.playerManager.playerReadyToPlay = ^(id<ZFPlayerMediaPlayback> _Nonnull asset, NSURL * _Nonnull assetURL) {
|
|
|
+ @zf_strongify(self)
|
|
|
+ [self videoPlayerDidFun];
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
- (void)viewDidAppear:(BOOL)animated
|
|
@@ -278,4 +284,23 @@
|
|
|
[self.player rotateToOrientation:UIInterfaceOrientationPortrait animated:YES completion:nil];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+#pragma mark 视频可以播放
|
|
|
+- (void)videoPlayerDidFun{
|
|
|
+
|
|
|
+ NASFileAndFolderDataModel *dataModel = _VideoDataMode;
|
|
|
+
|
|
|
+ lastFileModel *lastFileMod = [lastFileModel new];
|
|
|
+ lastFileMod.path = dataModel.path;
|
|
|
+ lastFileMod.name = dataModel.name;
|
|
|
+ lastFileMod.time = dataModel.time;
|
|
|
+ lastFileMod.size = dataModel.size;
|
|
|
+ lastFileMod.duration = dataModel.duration;
|
|
|
+ lastFileMod.type = @"jpg";
|
|
|
+ lastFileMod.lastPreTime = [iTools getNowTimeStamp];
|
|
|
+
|
|
|
+ [[lastFileManager shareManager] saveFileInfoWith:lastFileMod with:dataModel.path];
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
@end
|