From 1df1a6cfb8e8fd2dbac8889aac68d2f551ba7d35 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 24 Sep 2020 22:07:58 +0200 Subject: [PATCH] rename video width to inputWidth (and height) to avoid confusion --- index.js | 4 ++-- parseConfig.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 5d188fe..9d61511 100644 --- a/index.js +++ b/index.js @@ -76,8 +76,8 @@ const Editly = async (config = {}) => { clips.find((clip) => clip && clip.layers.find((layer) => { if (layer.type === 'video') { - detectedWidth = layer.width; - detectedHeight = layer.height; + detectedWidth = layer.inputWidth; + detectedHeight = layer.inputHeight; firstVideoFramerateStr = layer.framerateStr; return true; diff --git a/parseConfig.js b/parseConfig.js index 1e4459e..886c8f5 100644 --- a/parseConfig.js +++ b/parseConfig.js @@ -126,13 +126,13 @@ async function parseConfig({ defaults: defaultsIn = {}, clips, allowRemoteReques const inputDuration = cutTo - cutFrom; const isRotated = rotation === 90 || rotation === 270; - const width = isRotated ? heightIn : widthIn; - const height = isRotated ? widthIn : heightIn; + const inputWidth = isRotated ? heightIn : widthIn; + const inputHeight = isRotated ? widthIn : heightIn; // Compensate for transition duration const audioCutTo = Math.max(cutFrom, cutTo - transition.duration); - return { ...layer, cutFrom, cutTo, audioCutTo, inputDuration, width, height, framerateStr }; + return { ...layer, cutFrom, cutTo, audioCutTo, inputDuration, framerateStr, inputWidth, inputHeight }; } // Audio is handled later