How to save video to PhoneGap using captureVideo?

Capturing and saving an image in PhoneGap is very simple and straightforward, using the options in captureImage (), but captureVideo has only 3 options (none of them are supported), and they are not related to saving video.

Did anyone manage to do this using the File object after capturing the video?

+4
source share
1 answer

Get more information: http://docs.phonegap.com/en/2.1.0/cordova_media_capture_capture.md.html#CaptureVideo

If you use captureVideo, your video will be automatically saved and to access it, try the following:

function captureSuccess(mediaFiles) { alert(mediaFiles[0].fullPath); } 

Note: put null in parameter or limit: 1

Full example:

 function captureSuccess(mediaFiles) { alert(mediaFiles[0].fullPath); } function captureError(error) { alert('An error occurred during capture: ' + error.code); } function captureVideo() { navigator.device.capture.captureVideo(captureSuccess, captureError, null); } 
0
source

Source: https://habr.com/ru/post/1437074/


All Articles