remotion 4.0.267 → 4.0.269
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Composition.d.ts +1 -0
- package/dist/cjs/CompositionManagerContext.d.ts +1 -1
- package/dist/cjs/ResolveCompositionConfig.js +2 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/resolve-video-config.js +7 -3
- package/dist/cjs/use-unsafe-video-config.js +2 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video-config.d.ts +1 -0
- package/dist/esm/index.mjs +25 -10
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -18,6 +18,7 @@ export type CalcMetadataReturnType<T extends Record<string, unknown>> = {
|
|
|
18
18
|
height?: number;
|
|
19
19
|
props?: T;
|
|
20
20
|
defaultCodec?: Codec;
|
|
21
|
+
defaultOutName?: string;
|
|
21
22
|
};
|
|
22
23
|
export type CalculateMetadataFunction<T extends Record<string, unknown>> = (options: {
|
|
23
24
|
defaultProps: T;
|
|
@@ -3,7 +3,7 @@ import type { AnyZodObject } from 'zod';
|
|
|
3
3
|
import type { AnyComposition, TComposition } from './CompositionManager.js';
|
|
4
4
|
import type { TFolder } from './Folder.js';
|
|
5
5
|
import type { VideoConfig } from './video-config.js';
|
|
6
|
-
export type BaseMetadata = Pick<VideoConfig, 'durationInFrames' | 'fps' | 'props' | 'height' | 'width' | 'defaultCodec'>;
|
|
6
|
+
export type BaseMetadata = Pick<VideoConfig, 'durationInFrames' | 'fps' | 'props' | 'height' | 'width' | 'defaultCodec' | 'defaultOutName'>;
|
|
7
7
|
export type CanvasContent = {
|
|
8
8
|
type: 'composition';
|
|
9
9
|
compositionId: string;
|
|
@@ -320,6 +320,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
320
320
|
props: currentCompositionMetadata.props,
|
|
321
321
|
defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
|
|
322
322
|
defaultCodec: currentCompositionMetadata.defaultCodec,
|
|
323
|
+
defaultOutName: currentCompositionMetadata.defaultOutName,
|
|
323
324
|
},
|
|
324
325
|
};
|
|
325
326
|
}
|
|
@@ -349,6 +350,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
349
350
|
: ((_d = (0, input_props_js_1.getInputProps)()) !== null && _d !== void 0 ? _d : {})),
|
|
350
351
|
},
|
|
351
352
|
defaultCodec: null,
|
|
353
|
+
defaultOutName: null,
|
|
352
354
|
},
|
|
353
355
|
};
|
|
354
356
|
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -23,10 +23,11 @@ const validateCalculated = ({ calculated, compositionId, compositionFps, composi
|
|
|
23
23
|
});
|
|
24
24
|
const defaultCodec = calculated === null || calculated === void 0 ? void 0 : calculated.defaultCodec;
|
|
25
25
|
(0, validate_default_codec_js_1.validateDefaultCodec)(defaultCodec, calculateMetadataErrorLocation);
|
|
26
|
-
|
|
26
|
+
const defaultOutName = calculated === null || calculated === void 0 ? void 0 : calculated.defaultOutName;
|
|
27
|
+
return { width, height, fps, durationInFrames, defaultCodec, defaultOutName };
|
|
27
28
|
};
|
|
28
29
|
const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, originalProps, compositionId, compositionDurationInFrames, compositionFps, compositionHeight, compositionWidth, }) => {
|
|
29
|
-
var _a, _b;
|
|
30
|
+
var _a, _b, _c;
|
|
30
31
|
const calculatedProm = calculateMetadata
|
|
31
32
|
? calculateMetadata({
|
|
32
33
|
defaultProps,
|
|
@@ -40,7 +41,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, originalP
|
|
|
40
41
|
'then' in calculatedProm) {
|
|
41
42
|
return calculatedProm.then((c) => {
|
|
42
43
|
var _a;
|
|
43
|
-
const { height, width, durationInFrames, fps, defaultCodec } = validateCalculated({
|
|
44
|
+
const { height, width, durationInFrames, fps, defaultCodec, defaultOutName, } = validateCalculated({
|
|
44
45
|
calculated: c,
|
|
45
46
|
compositionDurationInFrames,
|
|
46
47
|
compositionFps,
|
|
@@ -57,6 +58,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, originalP
|
|
|
57
58
|
defaultProps: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(defaultProps),
|
|
58
59
|
props: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)((_a = c.props) !== null && _a !== void 0 ? _a : originalProps),
|
|
59
60
|
defaultCodec: defaultCodec !== null && defaultCodec !== void 0 ? defaultCodec : null,
|
|
61
|
+
defaultOutName: defaultOutName !== null && defaultOutName !== void 0 ? defaultOutName : null,
|
|
60
62
|
};
|
|
61
63
|
});
|
|
62
64
|
}
|
|
@@ -75,6 +77,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, originalP
|
|
|
75
77
|
defaultProps: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(defaultProps !== null && defaultProps !== void 0 ? defaultProps : {}),
|
|
76
78
|
props: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(originalProps),
|
|
77
79
|
defaultCodec: null,
|
|
80
|
+
defaultOutName: null,
|
|
78
81
|
};
|
|
79
82
|
}
|
|
80
83
|
return {
|
|
@@ -83,6 +86,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, originalP
|
|
|
83
86
|
defaultProps: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(defaultProps !== null && defaultProps !== void 0 ? defaultProps : {}),
|
|
84
87
|
props: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)((_a = calculatedProm.props) !== null && _a !== void 0 ? _a : originalProps),
|
|
85
88
|
defaultCodec: (_b = calculatedProm.defaultCodec) !== null && _b !== void 0 ? _b : null,
|
|
89
|
+
defaultOutName: (_c = calculatedProm.defaultOutName) !== null && _c !== void 0 ? _c : null,
|
|
86
90
|
};
|
|
87
91
|
};
|
|
88
92
|
exports.resolveVideoConfig = resolveVideoConfig;
|
|
@@ -15,7 +15,7 @@ const useUnsafeVideoConfig = () => {
|
|
|
15
15
|
if (!video) {
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
const { id, durationInFrames, fps, height, width, defaultProps, props, defaultCodec, } = video;
|
|
18
|
+
const { id, durationInFrames, fps, height, width, defaultProps, props, defaultCodec, defaultOutName, } = video;
|
|
19
19
|
return {
|
|
20
20
|
id,
|
|
21
21
|
width: ctxWidth !== null && ctxWidth !== void 0 ? ctxWidth : width,
|
|
@@ -25,6 +25,7 @@ const useUnsafeVideoConfig = () => {
|
|
|
25
25
|
defaultProps,
|
|
26
26
|
props,
|
|
27
27
|
defaultCodec,
|
|
28
|
+
defaultOutName,
|
|
28
29
|
};
|
|
29
30
|
}, [ctxDuration, ctxHeight, ctxWidth, video]);
|
|
30
31
|
};
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -104,7 +104,7 @@ function truthy(value) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// src/version.ts
|
|
107
|
-
var VERSION = "4.0.
|
|
107
|
+
var VERSION = "4.0.269";
|
|
108
108
|
|
|
109
109
|
// src/multiple-versions-warning.ts
|
|
110
110
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -586,7 +586,8 @@ var validateCalculated = ({
|
|
|
586
586
|
});
|
|
587
587
|
const defaultCodec = calculated?.defaultCodec;
|
|
588
588
|
validateDefaultCodec(defaultCodec, calculateMetadataErrorLocation);
|
|
589
|
-
|
|
589
|
+
const defaultOutName = calculated?.defaultOutName;
|
|
590
|
+
return { width, height, fps, durationInFrames, defaultCodec, defaultOutName };
|
|
590
591
|
};
|
|
591
592
|
var resolveVideoConfig = ({
|
|
592
593
|
calculateMetadata,
|
|
@@ -607,7 +608,14 @@ var resolveVideoConfig = ({
|
|
|
607
608
|
}) : null;
|
|
608
609
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
609
610
|
return calculatedProm.then((c) => {
|
|
610
|
-
const {
|
|
611
|
+
const {
|
|
612
|
+
height,
|
|
613
|
+
width,
|
|
614
|
+
durationInFrames,
|
|
615
|
+
fps,
|
|
616
|
+
defaultCodec,
|
|
617
|
+
defaultOutName
|
|
618
|
+
} = validateCalculated({
|
|
611
619
|
calculated: c,
|
|
612
620
|
compositionDurationInFrames,
|
|
613
621
|
compositionFps,
|
|
@@ -623,7 +631,8 @@ var resolveVideoConfig = ({
|
|
|
623
631
|
id: compositionId,
|
|
624
632
|
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
625
633
|
props: serializeThenDeserializeInStudio(c.props ?? originalProps),
|
|
626
|
-
defaultCodec: defaultCodec ?? null
|
|
634
|
+
defaultCodec: defaultCodec ?? null,
|
|
635
|
+
defaultOutName: defaultOutName ?? null
|
|
627
636
|
};
|
|
628
637
|
});
|
|
629
638
|
}
|
|
@@ -641,7 +650,8 @@ var resolveVideoConfig = ({
|
|
|
641
650
|
id: compositionId,
|
|
642
651
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
643
652
|
props: serializeThenDeserializeInStudio(originalProps),
|
|
644
|
-
defaultCodec: null
|
|
653
|
+
defaultCodec: null,
|
|
654
|
+
defaultOutName: null
|
|
645
655
|
};
|
|
646
656
|
}
|
|
647
657
|
return {
|
|
@@ -649,7 +659,8 @@ var resolveVideoConfig = ({
|
|
|
649
659
|
id: compositionId,
|
|
650
660
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
651
661
|
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
652
|
-
defaultCodec: calculatedProm.defaultCodec ?? null
|
|
662
|
+
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
663
|
+
defaultOutName: calculatedProm.defaultOutName ?? null
|
|
653
664
|
};
|
|
654
665
|
};
|
|
655
666
|
var resolveVideoConfigOrCatch = (params) => {
|
|
@@ -957,7 +968,8 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
957
968
|
id: composition.id,
|
|
958
969
|
props: currentCompositionMetadata.props,
|
|
959
970
|
defaultProps: composition.defaultProps ?? {},
|
|
960
|
-
defaultCodec: currentCompositionMetadata.defaultCodec
|
|
971
|
+
defaultCodec: currentCompositionMetadata.defaultCodec,
|
|
972
|
+
defaultOutName: currentCompositionMetadata.defaultOutName
|
|
961
973
|
}
|
|
962
974
|
};
|
|
963
975
|
}
|
|
@@ -983,7 +995,8 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
983
995
|
...selectedEditorProps ?? {},
|
|
984
996
|
...typeof window === "undefined" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {}
|
|
985
997
|
},
|
|
986
|
-
defaultCodec: null
|
|
998
|
+
defaultCodec: null,
|
|
999
|
+
defaultOutName: null
|
|
987
1000
|
}
|
|
988
1001
|
};
|
|
989
1002
|
}
|
|
@@ -1121,7 +1134,8 @@ var useUnsafeVideoConfig = () => {
|
|
|
1121
1134
|
width,
|
|
1122
1135
|
defaultProps,
|
|
1123
1136
|
props,
|
|
1124
|
-
defaultCodec
|
|
1137
|
+
defaultCodec,
|
|
1138
|
+
defaultOutName
|
|
1125
1139
|
} = video;
|
|
1126
1140
|
return {
|
|
1127
1141
|
id,
|
|
@@ -1131,7 +1145,8 @@ var useUnsafeVideoConfig = () => {
|
|
|
1131
1145
|
durationInFrames: ctxDuration ?? durationInFrames,
|
|
1132
1146
|
defaultProps,
|
|
1133
1147
|
props,
|
|
1134
|
-
defaultCodec
|
|
1148
|
+
defaultCodec,
|
|
1149
|
+
defaultOutName
|
|
1135
1150
|
};
|
|
1136
1151
|
}, [ctxDuration, ctxHeight, ctxWidth, video]);
|
|
1137
1152
|
};
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
|
|
4
4
|
},
|
|
5
5
|
"name": "remotion",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.269",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "5.96.1",
|
|
29
29
|
"zod": "3.22.3",
|
|
30
30
|
"eslint": "9.19.0",
|
|
31
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.269"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"remotion",
|