17 lines
579 B
JavaScript
17 lines
579 B
JavaScript
var exec = require('cordova/exec');
|
|
var argscheck = require('cordova/argscheck');
|
|
|
|
module.exports = {
|
|
capture(option, success, error) {
|
|
var getValue = argscheck.getValue;
|
|
|
|
var width = getValue(option.width, null);
|
|
var height = getValue(option.height, null);
|
|
var frameRate = getValue(option.frameRate, null);
|
|
var bitRate = getValue(option.bitRate, null);
|
|
var limit = getValue(option.limit, 3);
|
|
var duration = getValue(option.duration, 10);
|
|
exec(success, error, 'CapturePlugin', 'capture', [width,height,frameRate,bitRate,limit,duration]);
|
|
}
|
|
};
|