Browse Source

rename video width to inputWidth (and height)

to avoid confusion
pull/81/head
Mikael Finstad 6 years ago
parent
commit
1df1a6cfb8
  1. 4
      index.js
  2. 6
      parseConfig.js

4
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;

6
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

Loading…
Cancel
Save