iOS视频编辑系统自带控制器UIVideoEditorController目前发现编辑视频后无法导出
iOS13之前编辑完回调用UIVideoEditorController的三个代理方法
videoEditorController:didSaveEditedVideoToPath:
videoEditorController: didFailWithError:
videoEditorControllerDidCancel:
编辑完成后 videoEditorController:didSaveEditedVideoToPath:
代理方法会给出编辑后的地址,可是iOS13不知道苹果又有啥骚操作导致不能正常导出地址而是直接走第三个videoEditorControllerDidCancel:
取消的方法,怎么解决呢?通过我的实践使用#import <AVFoundation/AVFoundation.h>
框架进行视频编辑可以适配一下iOS13系统编辑视频的问题
核心代码
#pragma mark 视频裁剪
-
(void)notifyDelegateOfDidChange{
self.tempVideoPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@“tmpMov.mov”];[self deleteTempFile];
AVAsset *asset = [AVAsset assetWithURL:self.videoUrl];
AVAssetExportSession *exportSession = [[AVAssetExportSession