我有一个CollectionView
的图像,并在下一个ViewController
我录制的视频使用Av捕获的会话,我将它保存到移动文档目录,然后我来了回到集合,我现在重新加载集合视图我想在集合视图单元格中使用任何api录制视频。如何在表视图中播放recored视频输出url
我用下面的代码来保存视频条记录在目录
'- (void)saveRecordedFile:(NSURL *)recordedFile {
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
[assetLibrary writeVideoAtPathToSavedPhotosAlbum:recordedFile
completionBlock:
^(NSURL *assetURL, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
NSString *title;
NSString *message;
if (error != nil) {
title = @"Failed to save video";
message = [error localizedDescription];
}
else {
title = @"Saved!";
message = nil;
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
UIStoryboard *storybord=[UIStoryboard storyboardWithName:@"Main" bundle:nil];
shareViewController *shareview=[storybord instantiateViewControllerWithIdentifier:@"share"];
[self presentViewController:shareview animated:YES completion:nil];
});
}];
});
任何机构可以帮助出来来解决这个problem.solution视图代码被理解。我通过参考https://github.com/shu223/SlowMotionVideoRecorder
@Suraj sukale –
您在 “cellForItemsAtIndex” 做到这一点,你可以给任何解决方案方法。为视频解析项目出列视频单元格。 –
你可以建议我一些链接或一些代码,请 –