@remotion/promo-pages 4.0.492 → 4.0.494
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/Homepage.js +82 -65
- package/dist/design.js +80 -63
- package/dist/experts.js +80 -63
- package/dist/homepage/Pricing.js +80 -63
- package/dist/prompts/PromptsGallery.js +80 -63
- package/dist/prompts/PromptsShow.js +80 -63
- package/dist/prompts/PromptsSubmit.js +80 -63
- package/dist/team.js +80 -63
- package/dist/template-modal-content.js +80 -63
- package/dist/templates.js +80 -63
- package/package.json +13 -13
package/dist/Homepage.js
CHANGED
|
@@ -1822,6 +1822,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
1822
1822
|
if (currentCompositionMetadata) {
|
|
1823
1823
|
return {
|
|
1824
1824
|
type: "success",
|
|
1825
|
+
metadataSource: null,
|
|
1825
1826
|
result: {
|
|
1826
1827
|
...currentCompositionMetadata,
|
|
1827
1828
|
id: composition.id,
|
|
@@ -1839,6 +1840,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
1839
1840
|
validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
|
|
1840
1841
|
return {
|
|
1841
1842
|
type: "success",
|
|
1843
|
+
metadataSource: null,
|
|
1842
1844
|
result: {
|
|
1843
1845
|
width: composition.width,
|
|
1844
1846
|
height: composition.height,
|
|
@@ -2357,7 +2359,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2357
2359
|
}
|
|
2358
2360
|
return child.type;
|
|
2359
2361
|
};
|
|
2360
|
-
var VERSION = "4.0.
|
|
2362
|
+
var VERSION = "4.0.494";
|
|
2361
2363
|
var checkMultipleRemotionVersions = () => {
|
|
2362
2364
|
if (typeof globalThis === "undefined") {
|
|
2363
2365
|
return;
|
|
@@ -5722,7 +5724,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
5722
5724
|
const style = useMemo14(() => {
|
|
5723
5725
|
return {
|
|
5724
5726
|
...passedStyle,
|
|
5725
|
-
opacity: premountingActive || postmountingActive ? 0 :
|
|
5727
|
+
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
5726
5728
|
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
5727
5729
|
...premountingActive ? styleWhilePremounted : {},
|
|
5728
5730
|
...postmountingActive ? styleWhilePostmounted : {}
|
|
@@ -6300,6 +6302,13 @@ var decodeImage = async ({
|
|
|
6300
6302
|
frameCount: selectedTrack.frameCount
|
|
6301
6303
|
};
|
|
6302
6304
|
};
|
|
6305
|
+
var getCurrentTime = ({
|
|
6306
|
+
frame,
|
|
6307
|
+
playbackRate,
|
|
6308
|
+
fps
|
|
6309
|
+
}) => {
|
|
6310
|
+
return frame * playbackRate / fps;
|
|
6311
|
+
};
|
|
6303
6312
|
var serializeRequestInit = (requestInit) => {
|
|
6304
6313
|
if (!requestInit) {
|
|
6305
6314
|
return null;
|
|
@@ -6367,7 +6376,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6367
6376
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
6368
6377
|
const frame = useCurrentFrame();
|
|
6369
6378
|
const { fps } = useVideoConfig();
|
|
6370
|
-
const currentTime = frame
|
|
6379
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
6371
6380
|
const currentTimeRef = useRef9(currentTime);
|
|
6372
6381
|
currentTimeRef.current = currentTime;
|
|
6373
6382
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -6495,8 +6504,6 @@ var AnimatedImageInner = ({
|
|
|
6495
6504
|
ref,
|
|
6496
6505
|
...sequenceProps
|
|
6497
6506
|
}) => {
|
|
6498
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
6499
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
6500
6507
|
const actualRef = useRef9(null);
|
|
6501
6508
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
6502
6509
|
useImperativeHandle2(ref, () => {
|
|
@@ -6519,7 +6526,7 @@ var AnimatedImageInner = ({
|
|
|
6519
6526
|
};
|
|
6520
6527
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
6521
6528
|
layout: "none",
|
|
6522
|
-
durationInFrames
|
|
6529
|
+
durationInFrames,
|
|
6523
6530
|
name: "<AnimatedImage>",
|
|
6524
6531
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
6525
6532
|
controls,
|
|
@@ -10147,8 +10154,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10147
10154
|
name,
|
|
10148
10155
|
...sequenceProps
|
|
10149
10156
|
}, ref) => {
|
|
10150
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
10151
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
10152
10157
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
10153
10158
|
const actualRef = useRef22(null);
|
|
10154
10159
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -10160,7 +10165,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10160
10165
|
}
|
|
10161
10166
|
}, [ref]);
|
|
10162
10167
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
10163
|
-
durationInFrames
|
|
10168
|
+
durationInFrames,
|
|
10164
10169
|
name: name ?? "<HtmlInCanvas>",
|
|
10165
10170
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
10166
10171
|
controls,
|
|
@@ -11443,7 +11448,46 @@ var validateCalculated = ({
|
|
|
11443
11448
|
defaultSampleRate
|
|
11444
11449
|
};
|
|
11445
11450
|
};
|
|
11446
|
-
var
|
|
11451
|
+
var makeVideoConfigWithMetadata = ({
|
|
11452
|
+
calculated,
|
|
11453
|
+
compositionDurationInFrames,
|
|
11454
|
+
compositionFps,
|
|
11455
|
+
compositionHeight,
|
|
11456
|
+
compositionId,
|
|
11457
|
+
compositionWidth,
|
|
11458
|
+
defaultProps,
|
|
11459
|
+
originalProps
|
|
11460
|
+
}) => {
|
|
11461
|
+
const data = validateCalculated({
|
|
11462
|
+
calculated,
|
|
11463
|
+
compositionDurationInFrames,
|
|
11464
|
+
compositionFps,
|
|
11465
|
+
compositionHeight,
|
|
11466
|
+
compositionWidth,
|
|
11467
|
+
compositionId
|
|
11468
|
+
});
|
|
11469
|
+
return {
|
|
11470
|
+
metadataSource: {
|
|
11471
|
+
durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
|
|
11472
|
+
fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
|
|
11473
|
+
height: calculated?.height === undefined ? "composition" : "calculate-metadata",
|
|
11474
|
+
width: calculated?.width === undefined ? "composition" : "calculate-metadata"
|
|
11475
|
+
},
|
|
11476
|
+
videoConfig: {
|
|
11477
|
+
...data,
|
|
11478
|
+
id: compositionId,
|
|
11479
|
+
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
11480
|
+
props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
|
|
11481
|
+
defaultCodec: data.defaultCodec ?? null,
|
|
11482
|
+
defaultOutName: data.defaultOutName ?? null,
|
|
11483
|
+
defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
|
|
11484
|
+
defaultPixelFormat: data.defaultPixelFormat ?? null,
|
|
11485
|
+
defaultProResProfile: data.defaultProResProfile ?? null,
|
|
11486
|
+
defaultSampleRate: data.defaultSampleRate ?? null
|
|
11487
|
+
}
|
|
11488
|
+
};
|
|
11489
|
+
};
|
|
11490
|
+
var resolveVideoConfigWithMetadata = ({
|
|
11447
11491
|
calculateMetadata,
|
|
11448
11492
|
signal,
|
|
11449
11493
|
defaultProps,
|
|
@@ -11463,76 +11507,48 @@ var resolveVideoConfig = ({
|
|
|
11463
11507
|
}) : null;
|
|
11464
11508
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
11465
11509
|
return calculatedProm.then((c2) => {
|
|
11466
|
-
|
|
11467
|
-
height,
|
|
11468
|
-
width,
|
|
11469
|
-
durationInFrames,
|
|
11470
|
-
fps,
|
|
11471
|
-
defaultCodec,
|
|
11472
|
-
defaultOutName,
|
|
11473
|
-
defaultVideoImageFormat,
|
|
11474
|
-
defaultPixelFormat,
|
|
11475
|
-
defaultProResProfile,
|
|
11476
|
-
defaultSampleRate
|
|
11477
|
-
} = validateCalculated({
|
|
11510
|
+
return makeVideoConfigWithMetadata({
|
|
11478
11511
|
calculated: c2,
|
|
11479
11512
|
compositionDurationInFrames,
|
|
11480
11513
|
compositionFps,
|
|
11481
11514
|
compositionHeight,
|
|
11482
11515
|
compositionWidth,
|
|
11483
|
-
compositionId
|
|
11516
|
+
compositionId,
|
|
11517
|
+
defaultProps,
|
|
11518
|
+
originalProps
|
|
11484
11519
|
});
|
|
11485
|
-
return {
|
|
11486
|
-
width,
|
|
11487
|
-
height,
|
|
11488
|
-
fps,
|
|
11489
|
-
durationInFrames,
|
|
11490
|
-
id: compositionId,
|
|
11491
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
11492
|
-
props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
|
|
11493
|
-
defaultCodec: defaultCodec ?? null,
|
|
11494
|
-
defaultOutName: defaultOutName ?? null,
|
|
11495
|
-
defaultVideoImageFormat: defaultVideoImageFormat ?? null,
|
|
11496
|
-
defaultPixelFormat: defaultPixelFormat ?? null,
|
|
11497
|
-
defaultProResProfile: defaultProResProfile ?? null,
|
|
11498
|
-
defaultSampleRate: defaultSampleRate ?? null
|
|
11499
|
-
};
|
|
11500
11520
|
});
|
|
11501
11521
|
}
|
|
11502
|
-
|
|
11522
|
+
return makeVideoConfigWithMetadata({
|
|
11503
11523
|
calculated: calculatedProm,
|
|
11504
11524
|
compositionDurationInFrames,
|
|
11505
11525
|
compositionFps,
|
|
11506
11526
|
compositionHeight,
|
|
11507
11527
|
compositionWidth,
|
|
11508
|
-
compositionId
|
|
11528
|
+
compositionId,
|
|
11529
|
+
defaultProps,
|
|
11530
|
+
originalProps
|
|
11509
11531
|
});
|
|
11510
|
-
|
|
11532
|
+
};
|
|
11533
|
+
var resolveVideoConfig = (params) => {
|
|
11534
|
+
const resolved = resolveVideoConfigWithMetadata(params);
|
|
11535
|
+
if (typeof resolved === "object" && "then" in resolved) {
|
|
11536
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
11537
|
+
}
|
|
11538
|
+
return resolved.videoConfig;
|
|
11539
|
+
};
|
|
11540
|
+
var resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
11541
|
+
try {
|
|
11511
11542
|
return {
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
defaultPixelFormat: null,
|
|
11520
|
-
defaultProResProfile: null,
|
|
11521
|
-
defaultSampleRate: null
|
|
11543
|
+
type: "success",
|
|
11544
|
+
result: resolveVideoConfigWithMetadata(params)
|
|
11545
|
+
};
|
|
11546
|
+
} catch (err) {
|
|
11547
|
+
return {
|
|
11548
|
+
type: "error",
|
|
11549
|
+
error: err
|
|
11522
11550
|
};
|
|
11523
11551
|
}
|
|
11524
|
-
return {
|
|
11525
|
-
...data,
|
|
11526
|
-
id: compositionId,
|
|
11527
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
11528
|
-
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
11529
|
-
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
11530
|
-
defaultOutName: calculatedProm.defaultOutName ?? null,
|
|
11531
|
-
defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
|
|
11532
|
-
defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
|
|
11533
|
-
defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
|
|
11534
|
-
defaultSampleRate: calculatedProm.defaultSampleRate ?? null
|
|
11535
|
-
};
|
|
11536
11552
|
};
|
|
11537
11553
|
var resolveVideoConfigOrCatch = (params) => {
|
|
11538
11554
|
try {
|
|
@@ -12412,6 +12428,7 @@ var Internals = {
|
|
|
12412
12428
|
NonceContext,
|
|
12413
12429
|
resolveVideoConfig,
|
|
12414
12430
|
resolveVideoConfigOrCatch,
|
|
12431
|
+
resolveVideoConfigWithMetadataOrCatch,
|
|
12415
12432
|
ResolveCompositionContext,
|
|
12416
12433
|
useResolvedVideoConfig,
|
|
12417
12434
|
resolveCompositionsRef,
|
|
@@ -40922,7 +40939,7 @@ var getVideoSequenceDuration = ({
|
|
|
40922
40939
|
};
|
|
40923
40940
|
var PRORES_DOCS_URL = "https://www.remotion.dev/docs/videos/prores";
|
|
40924
40941
|
var proresDecoderNotEnabledMessage = (src) => {
|
|
40925
|
-
return `Cannot decode "${src}": it is encoded with Apple ProRes, which WebCodecs does not support natively. ` + `ProRes decoding is not enabled by default. Register the ProRes decoder by calling ` + `registerProresDecoder() from "@mediabunny/prores" in your entry point, before registerRoot(). ` + `See ${PRORES_DOCS_URL}
|
|
40942
|
+
return `Cannot decode "${src}": it is encoded with Apple ProRes, which WebCodecs does not support natively. ` + `ProRes decoding is not enabled by default. Register the ProRes decoder by calling ` + `registerProresDecoder() from "@mediabunny/prores" in your entry point, before registerRoot(). ` + `See ${PRORES_DOCS_URL}.`;
|
|
40926
40943
|
};
|
|
40927
40944
|
|
|
40928
40945
|
class ProResDecoderNotEnabledError extends Error {
|
|
@@ -43294,7 +43311,7 @@ import {
|
|
|
43294
43311
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
43295
43312
|
|
|
43296
43313
|
// ../core/dist/esm/version.mjs
|
|
43297
|
-
var VERSION2 = "4.0.
|
|
43314
|
+
var VERSION2 = "4.0.494";
|
|
43298
43315
|
|
|
43299
43316
|
// ../web-renderer/dist/esm/index.mjs
|
|
43300
43317
|
import { AudioSample, VideoSample } from "mediabunny";
|
package/dist/design.js
CHANGED
|
@@ -5052,6 +5052,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
5052
5052
|
if (currentCompositionMetadata) {
|
|
5053
5053
|
return {
|
|
5054
5054
|
type: "success",
|
|
5055
|
+
metadataSource: null,
|
|
5055
5056
|
result: {
|
|
5056
5057
|
...currentCompositionMetadata,
|
|
5057
5058
|
id: composition.id,
|
|
@@ -5069,6 +5070,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
5069
5070
|
validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
|
|
5070
5071
|
return {
|
|
5071
5072
|
type: "success",
|
|
5073
|
+
metadataSource: null,
|
|
5072
5074
|
result: {
|
|
5073
5075
|
width: composition.width,
|
|
5074
5076
|
height: composition.height,
|
|
@@ -5587,7 +5589,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5587
5589
|
}
|
|
5588
5590
|
return child.type;
|
|
5589
5591
|
};
|
|
5590
|
-
var VERSION = "4.0.
|
|
5592
|
+
var VERSION = "4.0.494";
|
|
5591
5593
|
var checkMultipleRemotionVersions = () => {
|
|
5592
5594
|
if (typeof globalThis === "undefined") {
|
|
5593
5595
|
return;
|
|
@@ -8952,7 +8954,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
8952
8954
|
const style = useMemo14(() => {
|
|
8953
8955
|
return {
|
|
8954
8956
|
...passedStyle,
|
|
8955
|
-
opacity: premountingActive || postmountingActive ? 0 :
|
|
8957
|
+
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
8956
8958
|
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
8957
8959
|
...premountingActive ? styleWhilePremounted : {},
|
|
8958
8960
|
...postmountingActive ? styleWhilePostmounted : {}
|
|
@@ -9530,6 +9532,13 @@ var decodeImage = async ({
|
|
|
9530
9532
|
frameCount: selectedTrack.frameCount
|
|
9531
9533
|
};
|
|
9532
9534
|
};
|
|
9535
|
+
var getCurrentTime = ({
|
|
9536
|
+
frame,
|
|
9537
|
+
playbackRate,
|
|
9538
|
+
fps
|
|
9539
|
+
}) => {
|
|
9540
|
+
return frame * playbackRate / fps;
|
|
9541
|
+
};
|
|
9533
9542
|
var serializeRequestInit = (requestInit) => {
|
|
9534
9543
|
if (!requestInit) {
|
|
9535
9544
|
return null;
|
|
@@ -9597,7 +9606,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9597
9606
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
9598
9607
|
const frame = useCurrentFrame();
|
|
9599
9608
|
const { fps } = useVideoConfig();
|
|
9600
|
-
const currentTime = frame
|
|
9609
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
9601
9610
|
const currentTimeRef = useRef9(currentTime);
|
|
9602
9611
|
currentTimeRef.current = currentTime;
|
|
9603
9612
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -9725,8 +9734,6 @@ var AnimatedImageInner = ({
|
|
|
9725
9734
|
ref,
|
|
9726
9735
|
...sequenceProps
|
|
9727
9736
|
}) => {
|
|
9728
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
9729
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9730
9737
|
const actualRef = useRef9(null);
|
|
9731
9738
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9732
9739
|
useImperativeHandle2(ref, () => {
|
|
@@ -9749,7 +9756,7 @@ var AnimatedImageInner = ({
|
|
|
9749
9756
|
};
|
|
9750
9757
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
9751
9758
|
layout: "none",
|
|
9752
|
-
durationInFrames
|
|
9759
|
+
durationInFrames,
|
|
9753
9760
|
name: "<AnimatedImage>",
|
|
9754
9761
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9755
9762
|
controls,
|
|
@@ -13377,8 +13384,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13377
13384
|
name,
|
|
13378
13385
|
...sequenceProps
|
|
13379
13386
|
}, ref) => {
|
|
13380
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
13381
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
13382
13387
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
13383
13388
|
const actualRef = useRef22(null);
|
|
13384
13389
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -13390,7 +13395,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13390
13395
|
}
|
|
13391
13396
|
}, [ref]);
|
|
13392
13397
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
13393
|
-
durationInFrames
|
|
13398
|
+
durationInFrames,
|
|
13394
13399
|
name: name ?? "<HtmlInCanvas>",
|
|
13395
13400
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
13396
13401
|
controls,
|
|
@@ -14673,7 +14678,46 @@ var validateCalculated = ({
|
|
|
14673
14678
|
defaultSampleRate
|
|
14674
14679
|
};
|
|
14675
14680
|
};
|
|
14676
|
-
var
|
|
14681
|
+
var makeVideoConfigWithMetadata = ({
|
|
14682
|
+
calculated,
|
|
14683
|
+
compositionDurationInFrames,
|
|
14684
|
+
compositionFps,
|
|
14685
|
+
compositionHeight,
|
|
14686
|
+
compositionId,
|
|
14687
|
+
compositionWidth,
|
|
14688
|
+
defaultProps,
|
|
14689
|
+
originalProps
|
|
14690
|
+
}) => {
|
|
14691
|
+
const data = validateCalculated({
|
|
14692
|
+
calculated,
|
|
14693
|
+
compositionDurationInFrames,
|
|
14694
|
+
compositionFps,
|
|
14695
|
+
compositionHeight,
|
|
14696
|
+
compositionWidth,
|
|
14697
|
+
compositionId
|
|
14698
|
+
});
|
|
14699
|
+
return {
|
|
14700
|
+
metadataSource: {
|
|
14701
|
+
durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
|
|
14702
|
+
fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
|
|
14703
|
+
height: calculated?.height === undefined ? "composition" : "calculate-metadata",
|
|
14704
|
+
width: calculated?.width === undefined ? "composition" : "calculate-metadata"
|
|
14705
|
+
},
|
|
14706
|
+
videoConfig: {
|
|
14707
|
+
...data,
|
|
14708
|
+
id: compositionId,
|
|
14709
|
+
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
14710
|
+
props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
|
|
14711
|
+
defaultCodec: data.defaultCodec ?? null,
|
|
14712
|
+
defaultOutName: data.defaultOutName ?? null,
|
|
14713
|
+
defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
|
|
14714
|
+
defaultPixelFormat: data.defaultPixelFormat ?? null,
|
|
14715
|
+
defaultProResProfile: data.defaultProResProfile ?? null,
|
|
14716
|
+
defaultSampleRate: data.defaultSampleRate ?? null
|
|
14717
|
+
}
|
|
14718
|
+
};
|
|
14719
|
+
};
|
|
14720
|
+
var resolveVideoConfigWithMetadata = ({
|
|
14677
14721
|
calculateMetadata,
|
|
14678
14722
|
signal,
|
|
14679
14723
|
defaultProps,
|
|
@@ -14693,76 +14737,48 @@ var resolveVideoConfig = ({
|
|
|
14693
14737
|
}) : null;
|
|
14694
14738
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
14695
14739
|
return calculatedProm.then((c2) => {
|
|
14696
|
-
|
|
14697
|
-
height,
|
|
14698
|
-
width,
|
|
14699
|
-
durationInFrames,
|
|
14700
|
-
fps,
|
|
14701
|
-
defaultCodec,
|
|
14702
|
-
defaultOutName,
|
|
14703
|
-
defaultVideoImageFormat,
|
|
14704
|
-
defaultPixelFormat,
|
|
14705
|
-
defaultProResProfile,
|
|
14706
|
-
defaultSampleRate
|
|
14707
|
-
} = validateCalculated({
|
|
14740
|
+
return makeVideoConfigWithMetadata({
|
|
14708
14741
|
calculated: c2,
|
|
14709
14742
|
compositionDurationInFrames,
|
|
14710
14743
|
compositionFps,
|
|
14711
14744
|
compositionHeight,
|
|
14712
14745
|
compositionWidth,
|
|
14713
|
-
compositionId
|
|
14746
|
+
compositionId,
|
|
14747
|
+
defaultProps,
|
|
14748
|
+
originalProps
|
|
14714
14749
|
});
|
|
14715
|
-
return {
|
|
14716
|
-
width,
|
|
14717
|
-
height,
|
|
14718
|
-
fps,
|
|
14719
|
-
durationInFrames,
|
|
14720
|
-
id: compositionId,
|
|
14721
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
14722
|
-
props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
|
|
14723
|
-
defaultCodec: defaultCodec ?? null,
|
|
14724
|
-
defaultOutName: defaultOutName ?? null,
|
|
14725
|
-
defaultVideoImageFormat: defaultVideoImageFormat ?? null,
|
|
14726
|
-
defaultPixelFormat: defaultPixelFormat ?? null,
|
|
14727
|
-
defaultProResProfile: defaultProResProfile ?? null,
|
|
14728
|
-
defaultSampleRate: defaultSampleRate ?? null
|
|
14729
|
-
};
|
|
14730
14750
|
});
|
|
14731
14751
|
}
|
|
14732
|
-
|
|
14752
|
+
return makeVideoConfigWithMetadata({
|
|
14733
14753
|
calculated: calculatedProm,
|
|
14734
14754
|
compositionDurationInFrames,
|
|
14735
14755
|
compositionFps,
|
|
14736
14756
|
compositionHeight,
|
|
14737
14757
|
compositionWidth,
|
|
14738
|
-
compositionId
|
|
14758
|
+
compositionId,
|
|
14759
|
+
defaultProps,
|
|
14760
|
+
originalProps
|
|
14739
14761
|
});
|
|
14740
|
-
|
|
14762
|
+
};
|
|
14763
|
+
var resolveVideoConfig = (params) => {
|
|
14764
|
+
const resolved = resolveVideoConfigWithMetadata(params);
|
|
14765
|
+
if (typeof resolved === "object" && "then" in resolved) {
|
|
14766
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
14767
|
+
}
|
|
14768
|
+
return resolved.videoConfig;
|
|
14769
|
+
};
|
|
14770
|
+
var resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
14771
|
+
try {
|
|
14741
14772
|
return {
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14748
|
-
|
|
14749
|
-
defaultPixelFormat: null,
|
|
14750
|
-
defaultProResProfile: null,
|
|
14751
|
-
defaultSampleRate: null
|
|
14773
|
+
type: "success",
|
|
14774
|
+
result: resolveVideoConfigWithMetadata(params)
|
|
14775
|
+
};
|
|
14776
|
+
} catch (err) {
|
|
14777
|
+
return {
|
|
14778
|
+
type: "error",
|
|
14779
|
+
error: err
|
|
14752
14780
|
};
|
|
14753
14781
|
}
|
|
14754
|
-
return {
|
|
14755
|
-
...data,
|
|
14756
|
-
id: compositionId,
|
|
14757
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
14758
|
-
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
14759
|
-
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
14760
|
-
defaultOutName: calculatedProm.defaultOutName ?? null,
|
|
14761
|
-
defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
|
|
14762
|
-
defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
|
|
14763
|
-
defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
|
|
14764
|
-
defaultSampleRate: calculatedProm.defaultSampleRate ?? null
|
|
14765
|
-
};
|
|
14766
14782
|
};
|
|
14767
14783
|
var resolveVideoConfigOrCatch = (params) => {
|
|
14768
14784
|
try {
|
|
@@ -15642,6 +15658,7 @@ var Internals = {
|
|
|
15642
15658
|
NonceContext,
|
|
15643
15659
|
resolveVideoConfig,
|
|
15644
15660
|
resolveVideoConfigOrCatch,
|
|
15661
|
+
resolveVideoConfigWithMetadataOrCatch,
|
|
15645
15662
|
ResolveCompositionContext,
|
|
15646
15663
|
useResolvedVideoConfig,
|
|
15647
15664
|
resolveCompositionsRef,
|