Reputation: 9965
When taking a video in the app the video is not saved to camera roll.
I have set the flag saveToPhotoAlbum: true.
My code
opt = {
limit: 1,
saveToPhotoAlbum: true,
quality: 1
};
navigator.device.capture.captureVideo(
that.captureVideoOnSuccess,
that.onCaptureFail,
opt
);
A similar code works for getPicture with no problems
navigator.camera.getPicture(
that.uploadPhoto,
that.onCaptureFail, {
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.CAMERA,
mediaType: Camera.MediaType.PICTURE,
saveToPhotoAlbum: true
}
);
Any idea how to over come this? Any solution will be welcome - by config, js code, Objective-C
Thanks
Upvotes: 1
Views: 990
Reputation: 9965
Here is my solution (based on https://groups.google.com/forum/#!topic/phonegap/245nKJoqqak)
In plugins/org.apache.cordova.media-capture/src/ios/CDVCapture.m
Method - (CDVPluginResult*)processVideo:(NSString*)moviePath forCallbackId:(NSString*)callbackId
Uncomment the lines under
/* don't need, it should automatically get saved
I don't know why those line are comment out...
Upvotes: 2