I'm currently trying develop an app in which I want to be able to record a video and I'm testing it at the moment with Teleriks everlive service. It takes me to the video camera on my phone correctly but then after recording as far as I'm aware the file should upload but it instead tells me the upload to the everlive has failed and the err.message is "Unexpected error". If anyone could tell me what i'm doing wrong i'd really appreciate it. Thanks.
var captureSuccess = function (mediaFiles) {
mediaAdded = true;
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
alert(mediaFiles[i].size);
var file = {
Filename: Math.random().toString(36).substring(2, 15) + ".mp4",
ContentType: "video/mp4",
base64: mediaFiles[i]
};
el.Files.create(file, function (response) {
alert("Photograph added.");
}, function (err) {
navigator.notification.alert("Unfortunately the upload failed: " + err.message);
});
}
};
function captureError() {
alert("Video Not Captured");
}
navigator.device.capture.captureVideo(captureSuccess, captureError, {
limit: 1,
duration: 20
});