diff --git a/lib/options/inputs.js b/lib/options/inputs.js index 804a21a3..84d42b51 100644 --- a/lib/options/inputs.js +++ b/lib/options/inputs.js @@ -59,6 +59,29 @@ module.exports = function(proto) { return this; }; +/** + * Adds multiple inputs from an array + * + * @method FfmpegCommand#inputPathArray + * @category Input + * + * @param {String[]} source Array of file paths + * @return FfmpegCommand + */ + proto.inputPathArray = function(source) { + var sourcePathArrConvert = Array.prototype.slice.call(source); + + sourcePathArrConvert.forEach(path => { + this._inputs.push(this._currentInput = { + source: path, + isFile: true, + isStream: false, + options: utils.args() + }); + }); + + return this; + } /** * Specify input format for the last specified input