saveToPhotoAlbum:true - 此标志应将视频保存到PhotoAlbum。
我正在使用cordova 3.3但它不起作用。
它适用于图像,它也适用于Android。
知道如何克服这个问题吗?
答案 0 :(得分:0)
在安装捕获插件之后,使用cordova 3.5-dev在CDVCaptrure.m第293行(function processVideo)中说:
/* don't need, it should automatically get saved
NSLog(@"can save %@: %d ?", moviePath, UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath));
if (&UIVideoAtPathIsCompatibleWithSavedPhotosAlbum != NULL && UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath) == YES) {
NSLog(@"try to save movie");
UISaveVideoAtPathToSavedPhotosAlbum(moviePath, nil, nil, nil);
NSLog(@"finished saving movie");
}*/
将其更改为:
NSLog(@"can save %@: %d ?", moviePath, UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath));
if (&UIVideoAtPathIsCompatibleWithSavedPhotosAlbum != NULL && UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath) == YES) {
NSLog(@"try to save movie");
UISaveVideoAtPathToSavedPhotosAlbum(moviePath, nil, nil, nil);
NSLog(@"finished saving movie");
}