1. recording function
Navigator. device. capture. captureaudio (function (Files) {// success callback function Ext. getcmp ("video_files_mainview "). config. param. sourceobj. startupload (files [0]. fullpath, 2) ;}, function (error) {// failure callback function // navigator. notification. alert ('error code: '+ error. code, null, 'capture error') ;},{ limit: 1}); // maximum number of files recorded at a time
2. Video Recording
Navigator. device. capture. capturevideo (function (Files) {// successful callback // navigator. notification. alert (files [0]. fullpath); Ext. getcmp ("video_files_mainview "). config. param. sourceobj. startupload (files [0]. fullpath, 1) ;}, function () {// failure callback // navigator. notification. alert ('error code: '+ err. code, null, 'uh oh! ');});
The recording calls a local recorder.
Simple code implementation of phonegap video recording and recording functions