How do I get the fileEntry from a captureVideo mediaFile? I keep getting
code 1 and code 5 errors depending on which method I try.
or is mediaFiles[i] already a FileEntry? Docs are not good.
I need the FileEntry so I can use copyTo().
I've tried getFile and resolveLocalFileSystemURI as shown below.
Appreciate any help.
Thanks,
Don
function recordVideo(){
// capture callback
var captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
createFileEntryVideo(path);
};
// capture error callback
var captureError = function(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture
Error');
};
// start video capture
navigator.device.capture.captureVideo(captureSuccess, captureError);
function createFileEntryVideo(path) {
try {
//window.resolveLocalFileSystemURI(path, copyVideo, onResolveFailVideo);
fileSys.root.getFile(path, null, copyVideo, onResolveFailVideo);
catch(err){alert(err)}
For more info on PhoneGap or to download the code go to www.phonegap.com
You received this message because you are subscribed to the Google Groups "phonegap" group.
For more options, visit https://groups.google.com/d/optout.
code 1 and code 5 errors depending on which method I try.
or is mediaFiles[i] already a FileEntry? Docs are not good.
I need the FileEntry so I can use copyTo().
I've tried getFile and resolveLocalFileSystemURI as shown below.
Appreciate any help.
Thanks,
Don
function recordVideo(){
// capture callback
var captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
createFileEntryVideo(path);
};
// capture error callback
var captureError = function(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture
Error');
};
// start video capture
navigator.device.capture.captureVideo(captureSuccess, captureError);
function createFileEntryVideo(path) {
try {
//window.resolveLocalFileSystemURI(path, copyVideo, onResolveFailVideo);
fileSys.root.getFile(path, null, copyVideo, onResolveFailVideo);
catch(err){alert(err)}
For more info on PhoneGap or to download the code go to www.phonegap.com
You received this message because you are subscribed to the Google Groups "phonegap" group.
For more options, visit https://groups.google.com/d/optout.