ビデオを camera roll に保存する必要があります。ビデオは 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"