remotion 4.0.492 → 4.0.493
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/ResolveCompositionConfig.d.ts +3 -0
- package/dist/cjs/ResolveCompositionConfig.js +2 -0
- package/dist/cjs/internals.d.ts +22 -1
- package/dist/cjs/internals.js +1 -0
- package/dist/cjs/resolve-video-config.d.ts +19 -1
- package/dist/cjs/resolve-video-config.js +61 -44
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrap-remotion-context.d.ts +2 -0
- package/dist/esm/index.mjs +69 -55
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AnyComposition } from './CompositionManager.js';
|
|
2
|
+
import type { VideoConfigMetadataSource } from './resolve-video-config.js';
|
|
2
3
|
import type { VideoConfig } from './video-config.js';
|
|
3
4
|
type ResolveCompositionConfigContect = Record<string, VideoConfigState | undefined>;
|
|
4
5
|
export declare const ResolveCompositionContext: import("react").Context<ResolveCompositionConfigContect | null>;
|
|
@@ -12,9 +13,11 @@ type VideoConfigState = {
|
|
|
12
13
|
} | {
|
|
13
14
|
type: 'success';
|
|
14
15
|
result: VideoConfig;
|
|
16
|
+
metadataSource: VideoConfigMetadataSource | null;
|
|
15
17
|
} | {
|
|
16
18
|
type: 'success-and-refreshing';
|
|
17
19
|
result: VideoConfig;
|
|
20
|
+
metadataSource: VideoConfigMetadataSource | null;
|
|
18
21
|
} | {
|
|
19
22
|
type: 'error';
|
|
20
23
|
error: Error;
|
|
@@ -35,6 +35,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
35
35
|
if (currentCompositionMetadata) {
|
|
36
36
|
return {
|
|
37
37
|
type: 'success',
|
|
38
|
+
metadataSource: null,
|
|
38
39
|
result: {
|
|
39
40
|
...currentCompositionMetadata,
|
|
40
41
|
id: composition.id,
|
|
@@ -52,6 +53,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
52
53
|
(0, validate_dimensions_js_1.validateDimension)(composition.height, 'height', `in <Composition id="${composition.id}">`);
|
|
53
54
|
return {
|
|
54
55
|
type: 'success',
|
|
56
|
+
metadataSource: null,
|
|
55
57
|
result: {
|
|
56
58
|
width: composition.width,
|
|
57
59
|
height: composition.height,
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -612,7 +612,7 @@ export declare const Internals: {
|
|
|
612
612
|
readonly EditorPropsContext: import("react").Context<import("./EditorProps.js").EditorPropsContextType>;
|
|
613
613
|
readonly usePreload: (src: string) => string;
|
|
614
614
|
readonly NonceContext: import("react").Context<import("./nonce.js").TNonceContext>;
|
|
615
|
-
readonly resolveVideoConfig: (
|
|
615
|
+
readonly resolveVideoConfig: (params: {
|
|
616
616
|
compositionId: string;
|
|
617
617
|
compositionWidth: number | null;
|
|
618
618
|
compositionHeight: number | null;
|
|
@@ -640,15 +640,34 @@ export declare const Internals: {
|
|
|
640
640
|
type: "error";
|
|
641
641
|
error: Error;
|
|
642
642
|
};
|
|
643
|
+
readonly resolveVideoConfigWithMetadataOrCatch: (params: {
|
|
644
|
+
compositionId: string;
|
|
645
|
+
compositionWidth: number | null;
|
|
646
|
+
compositionHeight: number | null;
|
|
647
|
+
compositionFps: number | null;
|
|
648
|
+
compositionDurationInFrames: number | null;
|
|
649
|
+
calculateMetadata: import("./Composition.js").CalculateMetadataFunction<Record<string, unknown>> | null;
|
|
650
|
+
signal: AbortSignal;
|
|
651
|
+
defaultProps: Record<string, unknown>;
|
|
652
|
+
inputProps: Record<string, unknown>;
|
|
653
|
+
}) => {
|
|
654
|
+
type: "success";
|
|
655
|
+
result: Promise<import("./resolve-video-config.js").VideoConfigWithMetadata> | import("./resolve-video-config.js").VideoConfigWithMetadata;
|
|
656
|
+
} | {
|
|
657
|
+
type: "error";
|
|
658
|
+
error: Error;
|
|
659
|
+
};
|
|
643
660
|
readonly ResolveCompositionContext: import("react").Context<{
|
|
644
661
|
[x: string]: ({
|
|
645
662
|
type: "loading";
|
|
646
663
|
} | {
|
|
647
664
|
type: "success";
|
|
648
665
|
result: import("./video-config.js").VideoConfig;
|
|
666
|
+
metadataSource: import("./resolve-video-config.js").VideoConfigMetadataSource | null;
|
|
649
667
|
} | {
|
|
650
668
|
type: "success-and-refreshing";
|
|
651
669
|
result: import("./video-config.js").VideoConfig;
|
|
670
|
+
metadataSource: import("./resolve-video-config.js").VideoConfigMetadataSource | null;
|
|
652
671
|
} | {
|
|
653
672
|
type: "error";
|
|
654
673
|
error: Error;
|
|
@@ -659,9 +678,11 @@ export declare const Internals: {
|
|
|
659
678
|
} | {
|
|
660
679
|
type: "success";
|
|
661
680
|
result: import("./video-config.js").VideoConfig;
|
|
681
|
+
metadataSource: import("./resolve-video-config.js").VideoConfigMetadataSource | null;
|
|
662
682
|
} | {
|
|
663
683
|
type: "success-and-refreshing";
|
|
664
684
|
result: import("./video-config.js").VideoConfig;
|
|
685
|
+
metadataSource: import("./resolve-video-config.js").VideoConfigMetadataSource | null;
|
|
665
686
|
} | {
|
|
666
687
|
type: "error";
|
|
667
688
|
error: Error;
|
package/dist/cjs/internals.js
CHANGED
|
@@ -195,6 +195,7 @@ exports.Internals = {
|
|
|
195
195
|
NonceContext: nonce_js_1.NonceContext,
|
|
196
196
|
resolveVideoConfig: resolve_video_config_js_1.resolveVideoConfig,
|
|
197
197
|
resolveVideoConfigOrCatch: resolve_video_config_js_1.resolveVideoConfigOrCatch,
|
|
198
|
+
resolveVideoConfigWithMetadataOrCatch: resolve_video_config_js_1.resolveVideoConfigWithMetadataOrCatch,
|
|
198
199
|
ResolveCompositionContext: ResolveCompositionConfig_js_1.ResolveCompositionContext,
|
|
199
200
|
useResolvedVideoConfig: ResolveCompositionConfig_js_1.useResolvedVideoConfig,
|
|
200
201
|
resolveCompositionsRef: ResolveCompositionConfig_js_1.resolveCompositionsRef,
|
|
@@ -13,7 +13,25 @@ type ResolveVideoConfigParams = {
|
|
|
13
13
|
defaultProps: Record<string, unknown>;
|
|
14
14
|
inputProps: Record<string, unknown>;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type VideoConfigMetadataSource = {
|
|
17
|
+
readonly durationInFrames: 'calculate-metadata' | 'composition';
|
|
18
|
+
readonly fps: 'calculate-metadata' | 'composition';
|
|
19
|
+
readonly height: 'calculate-metadata' | 'composition';
|
|
20
|
+
readonly width: 'calculate-metadata' | 'composition';
|
|
21
|
+
};
|
|
22
|
+
export type VideoConfigWithMetadata = {
|
|
23
|
+
readonly metadataSource: VideoConfigMetadataSource;
|
|
24
|
+
readonly videoConfig: VideoConfig;
|
|
25
|
+
};
|
|
26
|
+
export declare const resolveVideoConfigWithMetadata: ({ calculateMetadata, signal, defaultProps, inputProps: originalProps, compositionId, compositionDurationInFrames, compositionFps, compositionHeight, compositionWidth, }: ResolveVideoConfigParams) => Promise<VideoConfigWithMetadata> | VideoConfigWithMetadata;
|
|
27
|
+
export declare const resolveVideoConfig: (params: ResolveVideoConfigParams) => Promise<VideoConfig> | VideoConfig;
|
|
28
|
+
export declare const resolveVideoConfigWithMetadataOrCatch: (params: ResolveVideoConfigParams) => {
|
|
29
|
+
type: "success";
|
|
30
|
+
result: Promise<VideoConfigWithMetadata> | VideoConfigWithMetadata;
|
|
31
|
+
} | {
|
|
32
|
+
type: "error";
|
|
33
|
+
error: Error;
|
|
34
|
+
};
|
|
17
35
|
export declare const resolveVideoConfigOrCatch: (params: ResolveVideoConfigParams) => {
|
|
18
36
|
type: "success";
|
|
19
37
|
result: Promise<VideoConfig> | VideoConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveVideoConfigOrCatch = exports.resolveVideoConfig = void 0;
|
|
3
|
+
exports.resolveVideoConfigOrCatch = exports.resolveVideoConfigWithMetadataOrCatch = exports.resolveVideoConfig = exports.resolveVideoConfigWithMetadata = void 0;
|
|
4
4
|
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
5
5
|
const input_props_serialization_js_1 = require("./input-props-serialization.js");
|
|
6
6
|
const validate_default_codec_js_1 = require("./validation/validate-default-codec.js");
|
|
@@ -42,8 +42,40 @@ const validateCalculated = ({ calculated, compositionId, compositionFps, composi
|
|
|
42
42
|
defaultSampleRate,
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
const
|
|
45
|
+
const makeVideoConfigWithMetadata = ({ calculated, compositionDurationInFrames, compositionFps, compositionHeight, compositionId, compositionWidth, defaultProps, originalProps, }) => {
|
|
46
46
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
47
|
+
const data = validateCalculated({
|
|
48
|
+
calculated,
|
|
49
|
+
compositionDurationInFrames,
|
|
50
|
+
compositionFps,
|
|
51
|
+
compositionHeight,
|
|
52
|
+
compositionWidth,
|
|
53
|
+
compositionId,
|
|
54
|
+
});
|
|
55
|
+
return {
|
|
56
|
+
metadataSource: {
|
|
57
|
+
durationInFrames: (calculated === null || calculated === void 0 ? void 0 : calculated.durationInFrames) === undefined
|
|
58
|
+
? 'composition'
|
|
59
|
+
: 'calculate-metadata',
|
|
60
|
+
fps: (calculated === null || calculated === void 0 ? void 0 : calculated.fps) === undefined ? 'composition' : 'calculate-metadata',
|
|
61
|
+
height: (calculated === null || calculated === void 0 ? void 0 : calculated.height) === undefined ? 'composition' : 'calculate-metadata',
|
|
62
|
+
width: (calculated === null || calculated === void 0 ? void 0 : calculated.width) === undefined ? 'composition' : 'calculate-metadata',
|
|
63
|
+
},
|
|
64
|
+
videoConfig: {
|
|
65
|
+
...data,
|
|
66
|
+
id: compositionId,
|
|
67
|
+
defaultProps: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(defaultProps !== null && defaultProps !== void 0 ? defaultProps : {}),
|
|
68
|
+
props: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)((_a = calculated === null || calculated === void 0 ? void 0 : calculated.props) !== null && _a !== void 0 ? _a : originalProps),
|
|
69
|
+
defaultCodec: (_b = data.defaultCodec) !== null && _b !== void 0 ? _b : null,
|
|
70
|
+
defaultOutName: (_c = data.defaultOutName) !== null && _c !== void 0 ? _c : null,
|
|
71
|
+
defaultVideoImageFormat: (_d = data.defaultVideoImageFormat) !== null && _d !== void 0 ? _d : null,
|
|
72
|
+
defaultPixelFormat: (_e = data.defaultPixelFormat) !== null && _e !== void 0 ? _e : null,
|
|
73
|
+
defaultProResProfile: (_f = data.defaultProResProfile) !== null && _f !== void 0 ? _f : null,
|
|
74
|
+
defaultSampleRate: (_g = data.defaultSampleRate) !== null && _g !== void 0 ? _g : null,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
const resolveVideoConfigWithMetadata = ({ calculateMetadata, signal, defaultProps, inputProps: originalProps, compositionId, compositionDurationInFrames, compositionFps, compositionHeight, compositionWidth, }) => {
|
|
47
79
|
const calculatedProm = calculateMetadata
|
|
48
80
|
? calculateMetadata({
|
|
49
81
|
defaultProps,
|
|
@@ -57,68 +89,53 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, inputProp
|
|
|
57
89
|
typeof calculatedProm === 'object' &&
|
|
58
90
|
'then' in calculatedProm) {
|
|
59
91
|
return calculatedProm.then((c) => {
|
|
60
|
-
|
|
61
|
-
const { height, width, durationInFrames, fps, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat, defaultProResProfile, defaultSampleRate, } = validateCalculated({
|
|
92
|
+
return makeVideoConfigWithMetadata({
|
|
62
93
|
calculated: c,
|
|
63
94
|
compositionDurationInFrames,
|
|
64
95
|
compositionFps,
|
|
65
96
|
compositionHeight,
|
|
66
97
|
compositionWidth,
|
|
67
98
|
compositionId,
|
|
99
|
+
defaultProps,
|
|
100
|
+
originalProps,
|
|
68
101
|
});
|
|
69
|
-
return {
|
|
70
|
-
width,
|
|
71
|
-
height,
|
|
72
|
-
fps,
|
|
73
|
-
durationInFrames,
|
|
74
|
-
id: compositionId,
|
|
75
|
-
defaultProps: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(defaultProps),
|
|
76
|
-
props: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)((_a = c.props) !== null && _a !== void 0 ? _a : originalProps),
|
|
77
|
-
defaultCodec: defaultCodec !== null && defaultCodec !== void 0 ? defaultCodec : null,
|
|
78
|
-
defaultOutName: defaultOutName !== null && defaultOutName !== void 0 ? defaultOutName : null,
|
|
79
|
-
defaultVideoImageFormat: defaultVideoImageFormat !== null && defaultVideoImageFormat !== void 0 ? defaultVideoImageFormat : null,
|
|
80
|
-
defaultPixelFormat: defaultPixelFormat !== null && defaultPixelFormat !== void 0 ? defaultPixelFormat : null,
|
|
81
|
-
defaultProResProfile: defaultProResProfile !== null && defaultProResProfile !== void 0 ? defaultProResProfile : null,
|
|
82
|
-
defaultSampleRate: defaultSampleRate !== null && defaultSampleRate !== void 0 ? defaultSampleRate : null,
|
|
83
|
-
};
|
|
84
102
|
});
|
|
85
103
|
}
|
|
86
|
-
|
|
104
|
+
return makeVideoConfigWithMetadata({
|
|
87
105
|
calculated: calculatedProm,
|
|
88
106
|
compositionDurationInFrames,
|
|
89
107
|
compositionFps,
|
|
90
108
|
compositionHeight,
|
|
91
109
|
compositionWidth,
|
|
92
110
|
compositionId,
|
|
111
|
+
defaultProps,
|
|
112
|
+
originalProps,
|
|
93
113
|
});
|
|
94
|
-
|
|
114
|
+
};
|
|
115
|
+
exports.resolveVideoConfigWithMetadata = resolveVideoConfigWithMetadata;
|
|
116
|
+
const resolveVideoConfig = (params) => {
|
|
117
|
+
const resolved = (0, exports.resolveVideoConfigWithMetadata)(params);
|
|
118
|
+
if (typeof resolved === 'object' && 'then' in resolved) {
|
|
119
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
120
|
+
}
|
|
121
|
+
return resolved.videoConfig;
|
|
122
|
+
};
|
|
123
|
+
exports.resolveVideoConfig = resolveVideoConfig;
|
|
124
|
+
const resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
125
|
+
try {
|
|
95
126
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
defaultProResProfile: null,
|
|
105
|
-
defaultSampleRate: null,
|
|
127
|
+
type: 'success',
|
|
128
|
+
result: (0, exports.resolveVideoConfigWithMetadata)(params),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
return {
|
|
133
|
+
type: 'error',
|
|
134
|
+
error: err,
|
|
106
135
|
};
|
|
107
136
|
}
|
|
108
|
-
return {
|
|
109
|
-
...data,
|
|
110
|
-
id: compositionId,
|
|
111
|
-
defaultProps: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)(defaultProps !== null && defaultProps !== void 0 ? defaultProps : {}),
|
|
112
|
-
props: (0, input_props_serialization_js_1.serializeThenDeserializeInStudio)((_a = calculatedProm.props) !== null && _a !== void 0 ? _a : originalProps),
|
|
113
|
-
defaultCodec: (_b = calculatedProm.defaultCodec) !== null && _b !== void 0 ? _b : null,
|
|
114
|
-
defaultOutName: (_c = calculatedProm.defaultOutName) !== null && _c !== void 0 ? _c : null,
|
|
115
|
-
defaultVideoImageFormat: (_d = calculatedProm.defaultVideoImageFormat) !== null && _d !== void 0 ? _d : null,
|
|
116
|
-
defaultPixelFormat: (_e = calculatedProm.defaultPixelFormat) !== null && _e !== void 0 ? _e : null,
|
|
117
|
-
defaultProResProfile: (_f = calculatedProm.defaultProResProfile) !== null && _f !== void 0 ? _f : null,
|
|
118
|
-
defaultSampleRate: (_g = calculatedProm.defaultSampleRate) !== null && _g !== void 0 ? _g : null,
|
|
119
|
-
};
|
|
120
137
|
};
|
|
121
|
-
exports.
|
|
138
|
+
exports.resolveVideoConfigWithMetadataOrCatch = resolveVideoConfigWithMetadataOrCatch;
|
|
122
139
|
const resolveVideoConfigOrCatch = (params) => {
|
|
123
140
|
try {
|
|
124
141
|
const promiseOrReturnValue = (0, exports.resolveVideoConfig)(params);
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -15,9 +15,11 @@ export declare function useRemotionContexts(): {
|
|
|
15
15
|
} | {
|
|
16
16
|
type: "success";
|
|
17
17
|
result: import("./video-config.js").VideoConfig;
|
|
18
|
+
metadataSource: import("./resolve-video-config.js").VideoConfigMetadataSource | null;
|
|
18
19
|
} | {
|
|
19
20
|
type: "success-and-refreshing";
|
|
20
21
|
result: import("./video-config.js").VideoConfig;
|
|
22
|
+
metadataSource: import("./resolve-video-config.js").VideoConfigMetadataSource | null;
|
|
21
23
|
} | {
|
|
22
24
|
type: "error";
|
|
23
25
|
error: Error;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -729,6 +729,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
729
729
|
if (currentCompositionMetadata) {
|
|
730
730
|
return {
|
|
731
731
|
type: "success",
|
|
732
|
+
metadataSource: null,
|
|
732
733
|
result: {
|
|
733
734
|
...currentCompositionMetadata,
|
|
734
735
|
id: composition.id,
|
|
@@ -746,6 +747,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
746
747
|
validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
|
|
747
748
|
return {
|
|
748
749
|
type: "success",
|
|
750
|
+
metadataSource: null,
|
|
749
751
|
result: {
|
|
750
752
|
width: composition.width,
|
|
751
753
|
height: composition.height,
|
|
@@ -1308,7 +1310,7 @@ var getSingleChildComponent = (children) => {
|
|
|
1308
1310
|
};
|
|
1309
1311
|
|
|
1310
1312
|
// src/version.ts
|
|
1311
|
-
var VERSION = "4.0.
|
|
1313
|
+
var VERSION = "4.0.493";
|
|
1312
1314
|
|
|
1313
1315
|
// src/multiple-versions-warning.ts
|
|
1314
1316
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -10876,7 +10878,46 @@ var validateCalculated = ({
|
|
|
10876
10878
|
defaultSampleRate
|
|
10877
10879
|
};
|
|
10878
10880
|
};
|
|
10879
|
-
var
|
|
10881
|
+
var makeVideoConfigWithMetadata = ({
|
|
10882
|
+
calculated,
|
|
10883
|
+
compositionDurationInFrames,
|
|
10884
|
+
compositionFps,
|
|
10885
|
+
compositionHeight,
|
|
10886
|
+
compositionId,
|
|
10887
|
+
compositionWidth,
|
|
10888
|
+
defaultProps,
|
|
10889
|
+
originalProps
|
|
10890
|
+
}) => {
|
|
10891
|
+
const data = validateCalculated({
|
|
10892
|
+
calculated,
|
|
10893
|
+
compositionDurationInFrames,
|
|
10894
|
+
compositionFps,
|
|
10895
|
+
compositionHeight,
|
|
10896
|
+
compositionWidth,
|
|
10897
|
+
compositionId
|
|
10898
|
+
});
|
|
10899
|
+
return {
|
|
10900
|
+
metadataSource: {
|
|
10901
|
+
durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
|
|
10902
|
+
fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
|
|
10903
|
+
height: calculated?.height === undefined ? "composition" : "calculate-metadata",
|
|
10904
|
+
width: calculated?.width === undefined ? "composition" : "calculate-metadata"
|
|
10905
|
+
},
|
|
10906
|
+
videoConfig: {
|
|
10907
|
+
...data,
|
|
10908
|
+
id: compositionId,
|
|
10909
|
+
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
10910
|
+
props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
|
|
10911
|
+
defaultCodec: data.defaultCodec ?? null,
|
|
10912
|
+
defaultOutName: data.defaultOutName ?? null,
|
|
10913
|
+
defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
|
|
10914
|
+
defaultPixelFormat: data.defaultPixelFormat ?? null,
|
|
10915
|
+
defaultProResProfile: data.defaultProResProfile ?? null,
|
|
10916
|
+
defaultSampleRate: data.defaultSampleRate ?? null
|
|
10917
|
+
}
|
|
10918
|
+
};
|
|
10919
|
+
};
|
|
10920
|
+
var resolveVideoConfigWithMetadata = ({
|
|
10880
10921
|
calculateMetadata,
|
|
10881
10922
|
signal,
|
|
10882
10923
|
defaultProps,
|
|
@@ -10896,76 +10937,48 @@ var resolveVideoConfig = ({
|
|
|
10896
10937
|
}) : null;
|
|
10897
10938
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
10898
10939
|
return calculatedProm.then((c2) => {
|
|
10899
|
-
|
|
10900
|
-
height,
|
|
10901
|
-
width,
|
|
10902
|
-
durationInFrames,
|
|
10903
|
-
fps,
|
|
10904
|
-
defaultCodec,
|
|
10905
|
-
defaultOutName,
|
|
10906
|
-
defaultVideoImageFormat,
|
|
10907
|
-
defaultPixelFormat,
|
|
10908
|
-
defaultProResProfile,
|
|
10909
|
-
defaultSampleRate
|
|
10910
|
-
} = validateCalculated({
|
|
10940
|
+
return makeVideoConfigWithMetadata({
|
|
10911
10941
|
calculated: c2,
|
|
10912
10942
|
compositionDurationInFrames,
|
|
10913
10943
|
compositionFps,
|
|
10914
10944
|
compositionHeight,
|
|
10915
10945
|
compositionWidth,
|
|
10916
|
-
compositionId
|
|
10946
|
+
compositionId,
|
|
10947
|
+
defaultProps,
|
|
10948
|
+
originalProps
|
|
10917
10949
|
});
|
|
10918
|
-
return {
|
|
10919
|
-
width,
|
|
10920
|
-
height,
|
|
10921
|
-
fps,
|
|
10922
|
-
durationInFrames,
|
|
10923
|
-
id: compositionId,
|
|
10924
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
10925
|
-
props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
|
|
10926
|
-
defaultCodec: defaultCodec ?? null,
|
|
10927
|
-
defaultOutName: defaultOutName ?? null,
|
|
10928
|
-
defaultVideoImageFormat: defaultVideoImageFormat ?? null,
|
|
10929
|
-
defaultPixelFormat: defaultPixelFormat ?? null,
|
|
10930
|
-
defaultProResProfile: defaultProResProfile ?? null,
|
|
10931
|
-
defaultSampleRate: defaultSampleRate ?? null
|
|
10932
|
-
};
|
|
10933
10950
|
});
|
|
10934
10951
|
}
|
|
10935
|
-
|
|
10952
|
+
return makeVideoConfigWithMetadata({
|
|
10936
10953
|
calculated: calculatedProm,
|
|
10937
10954
|
compositionDurationInFrames,
|
|
10938
10955
|
compositionFps,
|
|
10939
10956
|
compositionHeight,
|
|
10940
10957
|
compositionWidth,
|
|
10941
|
-
compositionId
|
|
10958
|
+
compositionId,
|
|
10959
|
+
defaultProps,
|
|
10960
|
+
originalProps
|
|
10942
10961
|
});
|
|
10943
|
-
|
|
10962
|
+
};
|
|
10963
|
+
var resolveVideoConfig = (params) => {
|
|
10964
|
+
const resolved = resolveVideoConfigWithMetadata(params);
|
|
10965
|
+
if (typeof resolved === "object" && "then" in resolved) {
|
|
10966
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
10967
|
+
}
|
|
10968
|
+
return resolved.videoConfig;
|
|
10969
|
+
};
|
|
10970
|
+
var resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
10971
|
+
try {
|
|
10944
10972
|
return {
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
defaultPixelFormat: null,
|
|
10953
|
-
defaultProResProfile: null,
|
|
10954
|
-
defaultSampleRate: null
|
|
10973
|
+
type: "success",
|
|
10974
|
+
result: resolveVideoConfigWithMetadata(params)
|
|
10975
|
+
};
|
|
10976
|
+
} catch (err) {
|
|
10977
|
+
return {
|
|
10978
|
+
type: "error",
|
|
10979
|
+
error: err
|
|
10955
10980
|
};
|
|
10956
10981
|
}
|
|
10957
|
-
return {
|
|
10958
|
-
...data,
|
|
10959
|
-
id: compositionId,
|
|
10960
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
10961
|
-
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
10962
|
-
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
10963
|
-
defaultOutName: calculatedProm.defaultOutName ?? null,
|
|
10964
|
-
defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
|
|
10965
|
-
defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
|
|
10966
|
-
defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
|
|
10967
|
-
defaultSampleRate: calculatedProm.defaultSampleRate ?? null
|
|
10968
|
-
};
|
|
10969
10982
|
};
|
|
10970
10983
|
var resolveVideoConfigOrCatch = (params) => {
|
|
10971
10984
|
try {
|
|
@@ -11991,6 +12004,7 @@ var Internals = {
|
|
|
11991
12004
|
NonceContext,
|
|
11992
12005
|
resolveVideoConfig,
|
|
11993
12006
|
resolveVideoConfigOrCatch,
|
|
12007
|
+
resolveVideoConfigWithMetadataOrCatch,
|
|
11994
12008
|
ResolveCompositionContext,
|
|
11995
12009
|
useResolvedVideoConfig,
|
|
11996
12010
|
resolveCompositionsRef,
|
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.493",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "19.2.3",
|
|
36
36
|
"webpack": "5.105.0",
|
|
37
37
|
"zod": "4.3.6",
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
38
|
+
"@remotion/eslint-config-internal": "4.0.493",
|
|
39
39
|
"eslint": "9.19.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
41
41
|
},
|