I'm creating an app which records video and uploads it to a database. But the camera component launches in photo mode by default. Is there any detailed tutorial explaining video recording?
I'm creating an app which records video and uploads it to a database. But the camera component launches in photo mode by default. Is there any detailed tutorial explaining video recording?
Hello! You have to use cordova plugin capture. It's available in app by defaul, so no need to install it through Eclipse. Here is more information on how to configure it http://cordova.apache.org/docs/en/2.4...
Thanks for the super quick reply. However, I'm totally new to app development and coding in general. The best thing about Appery is I have been able to get a lot done without coding. Could you please give me some guidelines as to which files I have to put this code in and how to invoke it?
I broadly know that it is some sort of Javascript code so I have to put it in a JS file, but which JS file and how to call it is something I'm unsure of.
1) In app settings on Android permissions tab check RECORD_AUDIO and WRITE_EXTERNAL_STORAGE;
2) on page add button, on button Click event run JS:
codevar captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles.fullPath;
alert(path);
// do something interesting with the file
}
};
// 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, {limit:1});/code
After video recording is finished, you'll return back to the app and see an alert with file name.
Hi, Marina.
Thanks for this tip. I followed your instructions.
I'm not getting the camera to come up when I test the button. Will the js work in the test environment? I tried on the phone and the browser.
Thanks - Ben
Hi Benjamin,
No, you should build APK or IPA binary and install it on device.
Thank you, Katya.
what about the upload part of this post?
Hello! Use FileTransfer http://docs.phonegap.com/en/2.4.0/cor...
Hello Miss Brodina:
isn't there a way to transform it in to a string an upload it to appery backend or any mongodb?