我必须将视频保存到相机胶卷,视频是 nsdata 的形式。我知道这是方法
UISaveVideoAtPathToSavedPhotosAlbum(videopath, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);
- (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
NSLog(@"is error?%@",error);
}
也试过这个但不适合我
NSURL *movieURL = [NSURL fileURLWithPath:self.videoPath];
NSLog(@"movie url== %@",self.videoPath);
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library writeVideoAtPathToSavedPhotosAlbum:movieURL
completionBlock:^(NSURL *assetURL, NSError *error){NSLog(@"complete ");}];
此方法接受路径不是 nsdata 。我应该怎么办?
这里视频路径 = @"/var/mobile/Applications/AE75E729-7F10-478B-9DAF-E730EB4231D1/Documents/Videos/12.mp4"