From 2348fb5695ad40f43096700de91382b1cb85c01a Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Mar 2021 02:17:00 -0700 Subject: [PATCH 1/2] added ability to use array of paths to create inputs --- lib/options/inputs.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/options/inputs.js b/lib/options/inputs.js index 804a21a3..2184b055 100644 --- a/lib/options/inputs.js +++ b/lib/options/inputs.js @@ -59,6 +59,31 @@ 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 From feff57f81b6455925ff6e554f3048e8b87b0768a Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 13 May 2021 12:54:09 -0700 Subject: [PATCH 2/2] comment update --- lib/options/inputs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/options/inputs.js b/lib/options/inputs.js index 2184b055..84d42b51 100644 --- a/lib/options/inputs.js +++ b/lib/options/inputs.js @@ -62,8 +62,6 @@ module.exports = function(proto) { /** * Adds multiple inputs from an array * - * - * * @method FfmpegCommand#inputPathArray * @category Input *