@remotion/studio 4.0.446 → 4.0.448
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/components/Modals.js +1 -1
- package/dist/components/NewComposition/MenuContent.js +58 -0
- package/dist/components/NewComposition/menu-typeahead.d.ts +5 -0
- package/dist/components/NewComposition/menu-typeahead.js +27 -0
- package/dist/components/RenderButton.js +2 -0
- package/dist/components/RenderModal/OptionExplainer.js +10 -2
- package/dist/components/RenderModal/RenderModalAudio.d.ts +2 -0
- package/dist/components/RenderModal/RenderModalAudio.js +20 -1
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +7 -2
- package/dist/components/RenderModal/WebRenderModal.js +6 -2
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +2 -0
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +10 -2
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +4 -3
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RenderQueue/client-side-render-types.d.ts +1 -0
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +2 -1
- package/dist/esm/{chunk-2dkkw8x5.js → chunk-9s6mbe6g.js} +308 -113
- package/dist/esm/internals.mjs +308 -113
- package/dist/esm/previewEntry.mjs +309 -114
- package/dist/esm/renderEntry.mjs +3 -2
- package/dist/helpers/make-render-command.d.ts +3 -2
- package/dist/helpers/make-render-command.js +4 -1
- package/dist/helpers/retry-payload.js +4 -0
- package/dist/renderEntry.js +1 -0
- package/dist/state/modals.d.ts +2 -0
- package/package.json +9 -9
package/dist/esm/internals.mjs
CHANGED
|
@@ -29,7 +29,7 @@ import { Internals as Internals70 } from "remotion";
|
|
|
29
29
|
|
|
30
30
|
// src/components/Editor.tsx
|
|
31
31
|
import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
|
|
32
|
-
import React187, { useCallback as useCallback149, useMemo as
|
|
32
|
+
import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState98 } from "react";
|
|
33
33
|
import { Internals as Internals65 } from "remotion";
|
|
34
34
|
|
|
35
35
|
// src/helpers/colors.ts
|
|
@@ -2459,6 +2459,34 @@ var MenuSubItem = ({
|
|
|
2459
2459
|
});
|
|
2460
2460
|
};
|
|
2461
2461
|
|
|
2462
|
+
// src/components/NewComposition/menu-typeahead.ts
|
|
2463
|
+
var getLabelToMatch = (value) => {
|
|
2464
|
+
if (value.type === "divider" || value.disabled) {
|
|
2465
|
+
return null;
|
|
2466
|
+
}
|
|
2467
|
+
if (typeof value.label === "string") {
|
|
2468
|
+
return value.label;
|
|
2469
|
+
}
|
|
2470
|
+
return null;
|
|
2471
|
+
};
|
|
2472
|
+
var findTypeaheadMenuItem = ({
|
|
2473
|
+
query,
|
|
2474
|
+
values
|
|
2475
|
+
}) => {
|
|
2476
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
2477
|
+
if (normalizedQuery.length === 0) {
|
|
2478
|
+
return null;
|
|
2479
|
+
}
|
|
2480
|
+
const matched = values.find((value) => {
|
|
2481
|
+
const label = getLabelToMatch(value);
|
|
2482
|
+
return label ? label.toLowerCase().startsWith(normalizedQuery) : false;
|
|
2483
|
+
});
|
|
2484
|
+
if (!matched || matched.type === "divider") {
|
|
2485
|
+
return null;
|
|
2486
|
+
}
|
|
2487
|
+
return matched.id;
|
|
2488
|
+
};
|
|
2489
|
+
|
|
2462
2490
|
// src/components/NewComposition/MenuContent.tsx
|
|
2463
2491
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2464
2492
|
var BORDER_SIZE = 1;
|
|
@@ -2486,6 +2514,8 @@ var MenuContent = ({
|
|
|
2486
2514
|
const containerRef = useRef8(null);
|
|
2487
2515
|
const isMobileLayout = useMobileLayout();
|
|
2488
2516
|
const [subMenuActivated, setSubMenuActivated] = useState12(false);
|
|
2517
|
+
const typeaheadQueryRef = useRef8("");
|
|
2518
|
+
const typeaheadTimeoutRef = useRef8(null);
|
|
2489
2519
|
if (values[0].type === "divider") {
|
|
2490
2520
|
throw new Error("first value cant be divide");
|
|
2491
2521
|
}
|
|
@@ -2496,6 +2526,13 @@ var MenuContent = ({
|
|
|
2496
2526
|
const onItemSelected = useCallback11((id) => {
|
|
2497
2527
|
setSelectedItem(id);
|
|
2498
2528
|
}, []);
|
|
2529
|
+
const clearTypeahead = useCallback11(() => {
|
|
2530
|
+
typeaheadQueryRef.current = "";
|
|
2531
|
+
if (typeaheadTimeoutRef.current !== null) {
|
|
2532
|
+
window.clearTimeout(typeaheadTimeoutRef.current);
|
|
2533
|
+
typeaheadTimeoutRef.current = null;
|
|
2534
|
+
}
|
|
2535
|
+
}, []);
|
|
2499
2536
|
const isItemSelectable = useCallback11((v) => {
|
|
2500
2537
|
return v.type !== "divider" && !v.disabled;
|
|
2501
2538
|
}, []);
|
|
@@ -2569,6 +2606,30 @@ var MenuContent = ({
|
|
|
2569
2606
|
}
|
|
2570
2607
|
setSubMenuActivated("without-mouse");
|
|
2571
2608
|
}, [onNextMenu, selectedItem, values]);
|
|
2609
|
+
const onTypeahead = useCallback11((event) => {
|
|
2610
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.key.length !== 1 || event.key.trim().length === 0) {
|
|
2611
|
+
return;
|
|
2612
|
+
}
|
|
2613
|
+
const { activeElement } = document;
|
|
2614
|
+
if (activeElement instanceof HTMLInputElement || activeElement instanceof HTMLTextAreaElement) {
|
|
2615
|
+
return;
|
|
2616
|
+
}
|
|
2617
|
+
typeaheadQueryRef.current = `${typeaheadQueryRef.current}${event.key}`;
|
|
2618
|
+
const matchedId = findTypeaheadMenuItem({
|
|
2619
|
+
query: typeaheadQueryRef.current,
|
|
2620
|
+
values
|
|
2621
|
+
});
|
|
2622
|
+
if (matchedId !== null) {
|
|
2623
|
+
setSelectedItem(matchedId);
|
|
2624
|
+
}
|
|
2625
|
+
if (typeaheadTimeoutRef.current !== null) {
|
|
2626
|
+
window.clearTimeout(typeaheadTimeoutRef.current);
|
|
2627
|
+
}
|
|
2628
|
+
typeaheadTimeoutRef.current = window.setTimeout(() => {
|
|
2629
|
+
typeaheadQueryRef.current = "";
|
|
2630
|
+
typeaheadTimeoutRef.current = null;
|
|
2631
|
+
}, 700);
|
|
2632
|
+
}, [values]);
|
|
2572
2633
|
const containerWithHeight = useMemo15(() => {
|
|
2573
2634
|
const containerStyles = { ...container6 };
|
|
2574
2635
|
if (fixedHeight === null) {
|
|
@@ -2581,6 +2642,24 @@ var MenuContent = ({
|
|
|
2581
2642
|
}
|
|
2582
2643
|
return containerStyles;
|
|
2583
2644
|
}, [fixedHeight, isMobileLayout]);
|
|
2645
|
+
useEffect10(() => {
|
|
2646
|
+
if (!keybindings.isHighestContext || !process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
2647
|
+
return;
|
|
2648
|
+
}
|
|
2649
|
+
const onKeyDown = (event) => {
|
|
2650
|
+
onTypeahead(event);
|
|
2651
|
+
};
|
|
2652
|
+
window.addEventListener("keydown", onKeyDown);
|
|
2653
|
+
return () => {
|
|
2654
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
2655
|
+
clearTypeahead();
|
|
2656
|
+
};
|
|
2657
|
+
}, [clearTypeahead, keybindings.isHighestContext, onTypeahead]);
|
|
2658
|
+
useEffect10(() => {
|
|
2659
|
+
return () => {
|
|
2660
|
+
clearTypeahead();
|
|
2661
|
+
};
|
|
2662
|
+
}, [clearTypeahead]);
|
|
2584
2663
|
useEffect10(() => {
|
|
2585
2664
|
const escapeBinding = keybindings.registerKeybinding({
|
|
2586
2665
|
event: "keydown",
|
|
@@ -3052,6 +3131,7 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
3052
3131
|
renderTypeOfLastRender: null,
|
|
3053
3132
|
defaulMetadata: defaults.metadata,
|
|
3054
3133
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
3134
|
+
initialSampleRate: defaults.sampleRate,
|
|
3055
3135
|
initialChromeMode: defaults.chromeMode,
|
|
3056
3136
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
3057
3137
|
renderDefaults: defaults,
|
|
@@ -3875,7 +3955,8 @@ var addVideoRenderJob = ({
|
|
|
3875
3955
|
metadata,
|
|
3876
3956
|
hardwareAcceleration,
|
|
3877
3957
|
chromeMode,
|
|
3878
|
-
mediaCacheSizeInBytes
|
|
3958
|
+
mediaCacheSizeInBytes,
|
|
3959
|
+
sampleRate
|
|
3879
3960
|
}) => {
|
|
3880
3961
|
return callApi("/api/render", {
|
|
3881
3962
|
compositionId,
|
|
@@ -3922,7 +4003,8 @@ var addVideoRenderJob = ({
|
|
|
3922
4003
|
metadata,
|
|
3923
4004
|
hardwareAcceleration,
|
|
3924
4005
|
chromeMode,
|
|
3925
|
-
mediaCacheSizeInBytes
|
|
4006
|
+
mediaCacheSizeInBytes,
|
|
4007
|
+
sampleRate
|
|
3926
4008
|
});
|
|
3927
4009
|
};
|
|
3928
4010
|
var unsubscribeFromFileExistenceWatcher = ({
|
|
@@ -16233,7 +16315,7 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16233
16315
|
if (!compositionRef) {
|
|
16234
16316
|
throw new Error(`Composition not found for job ${job.id}`);
|
|
16235
16317
|
}
|
|
16236
|
-
const
|
|
16318
|
+
const blob = await (await renderStillOnWeb({
|
|
16237
16319
|
composition: {
|
|
16238
16320
|
component: compositionRef.component,
|
|
16239
16321
|
width: compositionRef.width,
|
|
@@ -16245,15 +16327,15 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16245
16327
|
id: job.compositionId
|
|
16246
16328
|
},
|
|
16247
16329
|
frame: job.frame,
|
|
16248
|
-
imageFormat: job.imageFormat,
|
|
16249
16330
|
inputProps: job.inputProps,
|
|
16250
16331
|
delayRenderTimeoutInMilliseconds: job.delayRenderTimeout,
|
|
16251
16332
|
mediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16252
16333
|
logLevel: job.logLevel,
|
|
16253
16334
|
licenseKey: job.licenseKey ?? undefined,
|
|
16254
16335
|
scale: job.scale,
|
|
16255
|
-
signal
|
|
16256
|
-
|
|
16336
|
+
signal,
|
|
16337
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16338
|
+
})).blob({ format: job.imageFormat });
|
|
16257
16339
|
return {
|
|
16258
16340
|
getBlob: () => Promise.resolve(blob),
|
|
16259
16341
|
width: compositionRef.width,
|
|
@@ -16303,7 +16385,8 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16303
16385
|
});
|
|
16304
16386
|
},
|
|
16305
16387
|
outputTarget: "web-fs",
|
|
16306
|
-
licenseKey: job.licenseKey ?? undefined
|
|
16388
|
+
licenseKey: job.licenseKey ?? undefined,
|
|
16389
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16307
16390
|
});
|
|
16308
16391
|
return {
|
|
16309
16392
|
getBlob,
|
|
@@ -16844,6 +16927,7 @@ var makeRetryPayload = (job) => {
|
|
|
16844
16927
|
defaulMetadata: job.metadata,
|
|
16845
16928
|
renderTypeOfLastRender: "still",
|
|
16846
16929
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
16930
|
+
initialSampleRate: defaults.sampleRate,
|
|
16847
16931
|
initialChromeMode: job.chromeMode,
|
|
16848
16932
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16849
16933
|
renderDefaults: defaults,
|
|
@@ -16897,6 +16981,7 @@ var makeRetryPayload = (job) => {
|
|
|
16897
16981
|
defaulMetadata: job.metadata,
|
|
16898
16982
|
renderTypeOfLastRender: "sequence",
|
|
16899
16983
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
16984
|
+
initialSampleRate: defaults.sampleRate,
|
|
16900
16985
|
initialChromeMode: job.chromeMode,
|
|
16901
16986
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16902
16987
|
renderDefaults: defaults,
|
|
@@ -16950,6 +17035,7 @@ var makeRetryPayload = (job) => {
|
|
|
16950
17035
|
defaulMetadata: job.metadata,
|
|
16951
17036
|
renderTypeOfLastRender: "video",
|
|
16952
17037
|
initialHardwareAcceleration: job.hardwareAcceleration,
|
|
17038
|
+
initialSampleRate: job.sampleRate,
|
|
16953
17039
|
initialChromeMode: job.chromeMode,
|
|
16954
17040
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16955
17041
|
renderDefaults: defaults,
|
|
@@ -16981,7 +17067,8 @@ var makeClientRetryPayload = (job) => {
|
|
|
16981
17067
|
initialStillImageFormat: job.type === "client-still" ? job.imageFormat : "png",
|
|
16982
17068
|
initialKeyframeIntervalInSeconds: job.type === "client-video" ? job.keyframeIntervalInSeconds : null,
|
|
16983
17069
|
initialMuted: job.type === "client-video" ? job.muted : null,
|
|
16984
|
-
initialTransparent: job.type === "client-video" ? job.transparent : null
|
|
17070
|
+
initialTransparent: job.type === "client-video" ? job.transparent : null,
|
|
17071
|
+
initialAllowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16985
17072
|
};
|
|
16986
17073
|
};
|
|
16987
17074
|
|
|
@@ -18804,6 +18891,7 @@ var RenderButton = ({
|
|
|
18804
18891
|
renderTypeOfLastRender: null,
|
|
18805
18892
|
defaulMetadata: defaults.metadata,
|
|
18806
18893
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
18894
|
+
initialSampleRate: defaults.sampleRate,
|
|
18807
18895
|
initialChromeMode: defaults.chromeMode,
|
|
18808
18896
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
18809
18897
|
renderDefaults: defaults
|
|
@@ -18839,7 +18927,8 @@ var RenderButton = ({
|
|
|
18839
18927
|
initialKeyframeIntervalInSeconds: null,
|
|
18840
18928
|
initialTransparent: null,
|
|
18841
18929
|
initialMuted: null,
|
|
18842
|
-
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
|
|
18930
|
+
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
18931
|
+
initialAllowHtmlInCanvas: defaults.allowHtmlInCanvas
|
|
18843
18932
|
});
|
|
18844
18933
|
}, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
|
|
18845
18934
|
const onClick = useCallback93(() => {
|
|
@@ -27762,7 +27851,7 @@ import {
|
|
|
27762
27851
|
useCallback as useCallback141,
|
|
27763
27852
|
useContext as useContext94,
|
|
27764
27853
|
useEffect as useEffect83,
|
|
27765
|
-
useMemo as
|
|
27854
|
+
useMemo as useMemo143,
|
|
27766
27855
|
useReducer as useReducer2,
|
|
27767
27856
|
useRef as useRef49,
|
|
27768
27857
|
useState as useState91
|
|
@@ -27912,6 +28001,7 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
27912
28001
|
beepOnFinish,
|
|
27913
28002
|
repro,
|
|
27914
28003
|
metadata,
|
|
28004
|
+
sampleRate,
|
|
27915
28005
|
envVariables,
|
|
27916
28006
|
inputProps
|
|
27917
28007
|
}) => {
|
|
@@ -27999,6 +28089,9 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
27999
28089
|
if (audioCodec !== defaultAudioCodec) {
|
|
28000
28090
|
addFlagWithValue(flags, getRenderMediaFlag("audioCodec"), audioCodec);
|
|
28001
28091
|
}
|
|
28092
|
+
addValueFlagsIfChanged(flags, [
|
|
28093
|
+
renderMediaValueFlag("sampleRate", sampleRate, renderDefaults.sampleRate)
|
|
28094
|
+
]);
|
|
28002
28095
|
}
|
|
28003
28096
|
addTrueBooleanFlagsIfChanged(flags, [
|
|
28004
28097
|
renderMediaBooleanFlag("disallowParallelEncoding", disallowParallelEncoding, false),
|
|
@@ -28272,8 +28365,9 @@ var padding3 = {
|
|
|
28272
28365
|
var title6 = {
|
|
28273
28366
|
fontSize: 14
|
|
28274
28367
|
};
|
|
28368
|
+
var DESCRIPTION_FONT_SIZE_PX = 14;
|
|
28275
28369
|
var description = {
|
|
28276
|
-
fontSize:
|
|
28370
|
+
fontSize: DESCRIPTION_FONT_SIZE_PX,
|
|
28277
28371
|
maxWidth: 400
|
|
28278
28372
|
};
|
|
28279
28373
|
var link2 = {
|
|
@@ -28332,9 +28426,22 @@ var OptionExplainer = ({ option }) => {
|
|
|
28332
28426
|
}) : null
|
|
28333
28427
|
]
|
|
28334
28428
|
}),
|
|
28335
|
-
/* @__PURE__ */
|
|
28429
|
+
/* @__PURE__ */ jsxs126("div", {
|
|
28336
28430
|
style: description,
|
|
28337
|
-
children:
|
|
28431
|
+
children: [
|
|
28432
|
+
/* @__PURE__ */ jsx250("style", {
|
|
28433
|
+
children: `
|
|
28434
|
+
.__remotion-option-explainer-description a,
|
|
28435
|
+
.__remotion-option-explainer-description code {
|
|
28436
|
+
font-size: ${DESCRIPTION_FONT_SIZE_PX}px;
|
|
28437
|
+
}
|
|
28438
|
+
`
|
|
28439
|
+
}),
|
|
28440
|
+
/* @__PURE__ */ jsx250("div", {
|
|
28441
|
+
className: "__remotion-option-explainer-description",
|
|
28442
|
+
children: option.description("ssr")
|
|
28443
|
+
})
|
|
28444
|
+
]
|
|
28338
28445
|
})
|
|
28339
28446
|
]
|
|
28340
28447
|
}),
|
|
@@ -29657,7 +29764,7 @@ var RenderModalAdvanced = ({
|
|
|
29657
29764
|
|
|
29658
29765
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
29659
29766
|
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
29660
|
-
import { useCallback as useCallback134 } from "react";
|
|
29767
|
+
import { useCallback as useCallback134, useMemo as useMemo138 } from "react";
|
|
29661
29768
|
|
|
29662
29769
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
29663
29770
|
import { useCallback as useCallback131 } from "react";
|
|
@@ -29952,6 +30059,7 @@ var container55 = {
|
|
|
29952
30059
|
flex: 1,
|
|
29953
30060
|
overflowY: "auto"
|
|
29954
30061
|
};
|
|
30062
|
+
var commonSampleRates = [8000, 16000, 22050, 44100, 48000, 96000];
|
|
29955
30063
|
var RenderModalAudio = ({
|
|
29956
30064
|
muted,
|
|
29957
30065
|
setMuted,
|
|
@@ -29969,7 +30077,9 @@ var RenderModalAudio = ({
|
|
|
29969
30077
|
setForSeamlessAacConcatenation,
|
|
29970
30078
|
separateAudioTo,
|
|
29971
30079
|
setSeparateAudioTo,
|
|
29972
|
-
outName
|
|
30080
|
+
outName,
|
|
30081
|
+
sampleRate,
|
|
30082
|
+
setSampleRate
|
|
29973
30083
|
}) => {
|
|
29974
30084
|
const onShouldHaveTargetAudioBitrateChanged = useCallback134((e) => {
|
|
29975
30085
|
setShouldHaveCustomTargetAudioBitrate(e.target.checked);
|
|
@@ -29980,6 +30090,20 @@ var RenderModalAudio = ({
|
|
|
29980
30090
|
const onSeamlessAacConcatenationChanges = useCallback134((e) => {
|
|
29981
30091
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
29982
30092
|
}, [setForSeamlessAacConcatenation]);
|
|
30093
|
+
const sampleRateOptions = useMemo138(() => {
|
|
30094
|
+
return commonSampleRates.map((rate) => ({
|
|
30095
|
+
label: rate === 48000 ? `${rate} Hz (default)` : `${rate} Hz`,
|
|
30096
|
+
onClick: () => setSampleRate(rate),
|
|
30097
|
+
key: String(rate),
|
|
30098
|
+
leftItem: sampleRate === rate ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
30099
|
+
id: String(rate),
|
|
30100
|
+
keyHint: null,
|
|
30101
|
+
quickSwitcherLabel: null,
|
|
30102
|
+
subMenu: null,
|
|
30103
|
+
type: "item",
|
|
30104
|
+
value: String(rate)
|
|
30105
|
+
}));
|
|
30106
|
+
}, [sampleRate, setSampleRate]);
|
|
29983
30107
|
const audioCodecOptions = useCallback134((currentCodec) => {
|
|
29984
30108
|
return BrowserSafeApis8.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
|
|
29985
30109
|
return {
|
|
@@ -30120,6 +30244,31 @@ var RenderModalAudio = ({
|
|
|
30120
30244
|
})
|
|
30121
30245
|
})
|
|
30122
30246
|
]
|
|
30247
|
+
}) : null,
|
|
30248
|
+
renderMode !== "still" && !muted ? /* @__PURE__ */ jsxs135("div", {
|
|
30249
|
+
style: optionRow,
|
|
30250
|
+
children: [
|
|
30251
|
+
/* @__PURE__ */ jsxs135("div", {
|
|
30252
|
+
style: label5,
|
|
30253
|
+
children: [
|
|
30254
|
+
"Sample Rate ",
|
|
30255
|
+
/* @__PURE__ */ jsx263(Spacing, {
|
|
30256
|
+
x: 0.5
|
|
30257
|
+
}),
|
|
30258
|
+
/* @__PURE__ */ jsx263(OptionExplainerBubble, {
|
|
30259
|
+
id: "sampleRateOption"
|
|
30260
|
+
})
|
|
30261
|
+
]
|
|
30262
|
+
}),
|
|
30263
|
+
/* @__PURE__ */ jsx263("div", {
|
|
30264
|
+
style: rightRow,
|
|
30265
|
+
children: /* @__PURE__ */ jsx263(Combobox, {
|
|
30266
|
+
values: sampleRateOptions,
|
|
30267
|
+
selectedId: String(sampleRate),
|
|
30268
|
+
title: "Sample Rate"
|
|
30269
|
+
})
|
|
30270
|
+
})
|
|
30271
|
+
]
|
|
30123
30272
|
}) : null
|
|
30124
30273
|
]
|
|
30125
30274
|
});
|
|
@@ -30128,7 +30277,7 @@ var RenderModalAudio = ({
|
|
|
30128
30277
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
30129
30278
|
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
30130
30279
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
30131
|
-
import { useCallback as useCallback137, useMemo as
|
|
30280
|
+
import { useCallback as useCallback137, useMemo as useMemo140 } from "react";
|
|
30132
30281
|
|
|
30133
30282
|
// src/helpers/prores-labels.ts
|
|
30134
30283
|
var labelProResProfile = (profile) => {
|
|
@@ -30157,7 +30306,7 @@ var labelProResProfile = (profile) => {
|
|
|
30157
30306
|
import { useCallback as useCallback136 } from "react";
|
|
30158
30307
|
|
|
30159
30308
|
// src/components/RenderModal/MultiRangeSlider.tsx
|
|
30160
|
-
import { useCallback as useCallback135, useMemo as
|
|
30309
|
+
import { useCallback as useCallback135, useMemo as useMemo139 } from "react";
|
|
30161
30310
|
import { jsx as jsx264, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
30162
30311
|
var container56 = {
|
|
30163
30312
|
borderColor: "black",
|
|
@@ -30187,7 +30336,7 @@ var MultiRangeSlider = ({
|
|
|
30187
30336
|
onRightThumbDrag
|
|
30188
30337
|
}) => {
|
|
30189
30338
|
const getPercent = useCallback135((value) => Math.round((value - min) / (max - min) * 100), [min, max]);
|
|
30190
|
-
const rangeStyle =
|
|
30339
|
+
const rangeStyle = useMemo139(() => {
|
|
30191
30340
|
const minPercent = getPercent(start);
|
|
30192
30341
|
const maxPercent = getPercent(end);
|
|
30193
30342
|
return {
|
|
@@ -30394,7 +30543,7 @@ var RenderModalBasic = ({
|
|
|
30394
30543
|
showOutputName
|
|
30395
30544
|
}) => {
|
|
30396
30545
|
const existence = useFileExistence(outName);
|
|
30397
|
-
const videoCodecOptions =
|
|
30546
|
+
const videoCodecOptions = useMemo140(() => {
|
|
30398
30547
|
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
30399
30548
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
30400
30549
|
}).map((codecOption) => {
|
|
@@ -30412,7 +30561,7 @@ var RenderModalBasic = ({
|
|
|
30412
30561
|
};
|
|
30413
30562
|
});
|
|
30414
30563
|
}, [renderMode, setCodec, codec]);
|
|
30415
|
-
const proResProfileOptions =
|
|
30564
|
+
const proResProfileOptions = useMemo140(() => {
|
|
30416
30565
|
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
30417
30566
|
return {
|
|
30418
30567
|
label: labelProResProfile(option),
|
|
@@ -30444,7 +30593,7 @@ var RenderModalBasic = ({
|
|
|
30444
30593
|
const onValueChange = useCallback137((e) => {
|
|
30445
30594
|
setOutName(e.target.value);
|
|
30446
30595
|
}, [setOutName]);
|
|
30447
|
-
const logLevelOptions =
|
|
30596
|
+
const logLevelOptions = useMemo140(() => {
|
|
30448
30597
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
30449
30598
|
return {
|
|
30450
30599
|
label: humanReadableLogLevel(level),
|
|
@@ -30698,7 +30847,7 @@ var RenderModalGif = ({
|
|
|
30698
30847
|
|
|
30699
30848
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
30700
30849
|
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
30701
|
-
import { useCallback as useCallback140, useMemo as
|
|
30850
|
+
import { useCallback as useCallback140, useMemo as useMemo142 } from "react";
|
|
30702
30851
|
|
|
30703
30852
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
30704
30853
|
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
@@ -30717,7 +30866,7 @@ var JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
|
30717
30866
|
};
|
|
30718
30867
|
|
|
30719
30868
|
// src/components/RenderModal/ScaleSetting.tsx
|
|
30720
|
-
import { useMemo as
|
|
30869
|
+
import { useMemo as useMemo141 } from "react";
|
|
30721
30870
|
import { jsx as jsx270, jsxs as jsxs141, Fragment as Fragment46 } from "react/jsx-runtime";
|
|
30722
30871
|
var MIN_SCALE = 0.1;
|
|
30723
30872
|
var MAX_SCALE = 10;
|
|
@@ -30731,7 +30880,7 @@ var outputDimensionsStyle = {
|
|
|
30731
30880
|
marginTop: -10
|
|
30732
30881
|
};
|
|
30733
30882
|
var ScaleSetting = ({ scale, setScale, compositionWidth, compositionHeight }) => {
|
|
30734
|
-
const outputDimensions =
|
|
30883
|
+
const outputDimensions = useMemo141(() => {
|
|
30735
30884
|
const outputWidth = Math.round(compositionWidth * scale);
|
|
30736
30885
|
const outputHeight = Math.round(compositionHeight * scale);
|
|
30737
30886
|
return `${outputWidth}×${outputHeight}`;
|
|
@@ -30800,7 +30949,7 @@ var RenderModalPicture = ({
|
|
|
30800
30949
|
compositionWidth,
|
|
30801
30950
|
compositionHeight
|
|
30802
30951
|
}) => {
|
|
30803
|
-
const colorSpaceOptions =
|
|
30952
|
+
const colorSpaceOptions = useMemo142(() => {
|
|
30804
30953
|
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
30805
30954
|
return {
|
|
30806
30955
|
label: option,
|
|
@@ -30816,7 +30965,7 @@ var RenderModalPicture = ({
|
|
|
30816
30965
|
};
|
|
30817
30966
|
});
|
|
30818
30967
|
}, [colorSpace, setColorSpace]);
|
|
30819
|
-
const qualityControlOptions =
|
|
30968
|
+
const qualityControlOptions = useMemo142(() => {
|
|
30820
30969
|
return qualityControlModes.map((option) => {
|
|
30821
30970
|
return {
|
|
30822
30971
|
label: option === "crf" ? "CRF" : "Bitrate",
|
|
@@ -31138,6 +31287,7 @@ var RenderModal = ({
|
|
|
31138
31287
|
initialForSeamlessAacConcatenation,
|
|
31139
31288
|
renderTypeOfLastRender,
|
|
31140
31289
|
initialHardwareAcceleration,
|
|
31290
|
+
initialSampleRate,
|
|
31141
31291
|
defaultMetadata,
|
|
31142
31292
|
initialChromeMode,
|
|
31143
31293
|
renderDefaults
|
|
@@ -31195,6 +31345,7 @@ var RenderModal = ({
|
|
|
31195
31345
|
const [repro, setRepro] = useState91(() => initialRepro);
|
|
31196
31346
|
const [enforceAudioTrackState, setEnforceAudioTrackState] = useState91(() => initialEnforceAudioTrack);
|
|
31197
31347
|
const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState91(() => initialForSeamlessAacConcatenation);
|
|
31348
|
+
const [sampleRate, setSampleRate] = useState91(() => initialSampleRate);
|
|
31198
31349
|
const [renderMode, setRenderModeState] = useState91(initialRenderType);
|
|
31199
31350
|
const [jpegQuality, setJpegQuality] = useState91(() => initialJpegQuality);
|
|
31200
31351
|
const [scale, setScale] = useState91(() => initialScale);
|
|
@@ -31209,7 +31360,7 @@ var RenderModal = ({
|
|
|
31209
31360
|
const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
|
|
31210
31361
|
const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
|
|
31211
31362
|
const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
|
|
31212
|
-
const chromiumOptions =
|
|
31363
|
+
const chromiumOptions = useMemo143(() => {
|
|
31213
31364
|
return {
|
|
31214
31365
|
headless,
|
|
31215
31366
|
disableWebSecurity,
|
|
@@ -31251,19 +31402,19 @@ var RenderModal = ({
|
|
|
31251
31402
|
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
|
|
31252
31403
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
|
|
31253
31404
|
const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
|
|
31254
|
-
const codec =
|
|
31405
|
+
const codec = useMemo143(() => {
|
|
31255
31406
|
if (renderMode === "audio") {
|
|
31256
31407
|
return videoCodecForAudioTab;
|
|
31257
31408
|
}
|
|
31258
31409
|
return videoCodecForVideoTab;
|
|
31259
31410
|
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
31260
|
-
const numberOfGifLoops =
|
|
31411
|
+
const numberOfGifLoops = useMemo143(() => {
|
|
31261
31412
|
if (codec === "gif" && limitNumberOfGifLoops) {
|
|
31262
31413
|
return numberOfGifLoopsSetting;
|
|
31263
31414
|
}
|
|
31264
31415
|
return null;
|
|
31265
31416
|
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
31266
|
-
const audioBitrate =
|
|
31417
|
+
const audioBitrate = useMemo143(() => {
|
|
31267
31418
|
if (shouldHaveCustomTargetAudioBitrate) {
|
|
31268
31419
|
return customTargetAudioBitrate;
|
|
31269
31420
|
}
|
|
@@ -31271,10 +31422,10 @@ var RenderModal = ({
|
|
|
31271
31422
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
31272
31423
|
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
31273
31424
|
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
31274
|
-
const supportsBothQualityControls =
|
|
31425
|
+
const supportsBothQualityControls = useMemo143(() => {
|
|
31275
31426
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
31276
31427
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
31277
|
-
const qualityControlType =
|
|
31428
|
+
const qualityControlType = useMemo143(() => {
|
|
31278
31429
|
if (hardwareAcceleration === "if-possible" || hardwareAcceleration === "required") {
|
|
31279
31430
|
if (supportsVideoBitrate) {
|
|
31280
31431
|
return "bitrate";
|
|
@@ -31298,7 +31449,7 @@ var RenderModal = ({
|
|
|
31298
31449
|
supportsCrf,
|
|
31299
31450
|
supportsVideoBitrate
|
|
31300
31451
|
]);
|
|
31301
|
-
const videoBitrate =
|
|
31452
|
+
const videoBitrate = useMemo143(() => {
|
|
31302
31453
|
if (qualityControlType === "bitrate") {
|
|
31303
31454
|
return customTargetVideoBitrate;
|
|
31304
31455
|
}
|
|
@@ -31310,13 +31461,13 @@ var RenderModal = ({
|
|
|
31310
31461
|
return;
|
|
31311
31462
|
dispatch(payload);
|
|
31312
31463
|
}, []);
|
|
31313
|
-
const muted =
|
|
31464
|
+
const muted = useMemo143(() => {
|
|
31314
31465
|
if (renderMode === "video") {
|
|
31315
31466
|
return mutedState;
|
|
31316
31467
|
}
|
|
31317
31468
|
return false;
|
|
31318
31469
|
}, [mutedState, renderMode]);
|
|
31319
|
-
const enforceAudioTrack =
|
|
31470
|
+
const enforceAudioTrack = useMemo143(() => {
|
|
31320
31471
|
if (renderMode === "video") {
|
|
31321
31472
|
return enforceAudioTrackState;
|
|
31322
31473
|
}
|
|
@@ -31325,13 +31476,13 @@ var RenderModal = ({
|
|
|
31325
31476
|
}
|
|
31326
31477
|
return false;
|
|
31327
31478
|
}, [enforceAudioTrackState, renderMode]);
|
|
31328
|
-
const proResProfile =
|
|
31479
|
+
const proResProfile = useMemo143(() => {
|
|
31329
31480
|
if (renderMode === "video" && codec === "prores") {
|
|
31330
31481
|
return proResProfileSetting;
|
|
31331
31482
|
}
|
|
31332
31483
|
return null;
|
|
31333
31484
|
}, [codec, proResProfileSetting, renderMode]);
|
|
31334
|
-
const x264Preset =
|
|
31485
|
+
const x264Preset = useMemo143(() => {
|
|
31335
31486
|
if (renderMode === "video" && codec === "h264") {
|
|
31336
31487
|
return x264PresetSetting;
|
|
31337
31488
|
}
|
|
@@ -31342,19 +31493,19 @@ var RenderModal = ({
|
|
|
31342
31493
|
_setInputProps(updater);
|
|
31343
31494
|
}, []);
|
|
31344
31495
|
const [metadata] = useState91(() => defaultMetadata);
|
|
31345
|
-
const endFrame =
|
|
31496
|
+
const endFrame = useMemo143(() => {
|
|
31346
31497
|
if (endFrameOrNull === null) {
|
|
31347
31498
|
return resolvedComposition.durationInFrames - 1;
|
|
31348
31499
|
}
|
|
31349
31500
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrameOrNull));
|
|
31350
31501
|
}, [resolvedComposition.durationInFrames, endFrameOrNull]);
|
|
31351
|
-
const startFrame =
|
|
31502
|
+
const startFrame = useMemo143(() => {
|
|
31352
31503
|
if (startFrameOrNull === null) {
|
|
31353
31504
|
return 0;
|
|
31354
31505
|
}
|
|
31355
31506
|
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
31356
31507
|
}, [endFrame, startFrameOrNull]);
|
|
31357
|
-
const frame2 =
|
|
31508
|
+
const frame2 = useMemo143(() => {
|
|
31358
31509
|
const parsed = Math.floor(unclampedFrame);
|
|
31359
31510
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
31360
31511
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
@@ -31475,17 +31626,17 @@ var RenderModal = ({
|
|
|
31475
31626
|
mediaCacheSizeInBytes
|
|
31476
31627
|
]);
|
|
31477
31628
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
|
|
31478
|
-
const everyNthFrame =
|
|
31629
|
+
const everyNthFrame = useMemo143(() => {
|
|
31479
31630
|
if (codec === "gif") {
|
|
31480
31631
|
return everyNthFrameSetting;
|
|
31481
31632
|
}
|
|
31482
31633
|
return 1;
|
|
31483
31634
|
}, [codec, everyNthFrameSetting]);
|
|
31484
31635
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
31485
|
-
const availablePixelFormats =
|
|
31636
|
+
const availablePixelFormats = useMemo143(() => {
|
|
31486
31637
|
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
31487
31638
|
}, [codec]);
|
|
31488
|
-
const pixelFormat =
|
|
31639
|
+
const pixelFormat = useMemo143(() => {
|
|
31489
31640
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
31490
31641
|
return userPreferredPixelFormat;
|
|
31491
31642
|
}
|
|
@@ -31536,7 +31687,8 @@ var RenderModal = ({
|
|
|
31536
31687
|
hardwareAcceleration,
|
|
31537
31688
|
chromeMode,
|
|
31538
31689
|
offthreadVideoThreads,
|
|
31539
|
-
mediaCacheSizeInBytes
|
|
31690
|
+
mediaCacheSizeInBytes,
|
|
31691
|
+
sampleRate
|
|
31540
31692
|
}).then(() => {
|
|
31541
31693
|
dispatchIfMounted({ type: "succeed" });
|
|
31542
31694
|
setSelectedModal(null);
|
|
@@ -31588,7 +31740,8 @@ var RenderModal = ({
|
|
|
31588
31740
|
hardwareAcceleration,
|
|
31589
31741
|
chromeMode,
|
|
31590
31742
|
offthreadVideoThreads,
|
|
31591
|
-
mediaCacheSizeInBytes
|
|
31743
|
+
mediaCacheSizeInBytes,
|
|
31744
|
+
sampleRate
|
|
31592
31745
|
]);
|
|
31593
31746
|
const onClickSequence = useCallback141(() => {
|
|
31594
31747
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
@@ -31656,7 +31809,7 @@ var RenderModal = ({
|
|
|
31656
31809
|
isMounted.current = false;
|
|
31657
31810
|
};
|
|
31658
31811
|
}, []);
|
|
31659
|
-
const imageFormatOptions =
|
|
31812
|
+
const imageFormatOptions = useMemo143(() => {
|
|
31660
31813
|
if (renderMode === "still") {
|
|
31661
31814
|
return [
|
|
31662
31815
|
{
|
|
@@ -31752,7 +31905,7 @@ var RenderModal = ({
|
|
|
31752
31905
|
stillImageFormat,
|
|
31753
31906
|
videoCodecForVideoTab
|
|
31754
31907
|
]);
|
|
31755
|
-
const renderTabOptions =
|
|
31908
|
+
const renderTabOptions = useMemo143(() => {
|
|
31756
31909
|
if (resolvedComposition?.durationInFrames < 2) {
|
|
31757
31910
|
return [
|
|
31758
31911
|
{
|
|
@@ -31810,7 +31963,7 @@ var RenderModal = ({
|
|
|
31810
31963
|
});
|
|
31811
31964
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
31812
31965
|
const { registerKeybinding } = useKeybinding();
|
|
31813
|
-
const readOnlyRenderCommand =
|
|
31966
|
+
const readOnlyRenderCommand = useMemo143(() => {
|
|
31814
31967
|
if (!readOnlyStudio) {
|
|
31815
31968
|
return null;
|
|
31816
31969
|
}
|
|
@@ -31866,6 +32019,7 @@ var RenderModal = ({
|
|
|
31866
32019
|
beepOnFinish,
|
|
31867
32020
|
repro,
|
|
31868
32021
|
metadata,
|
|
32022
|
+
sampleRate,
|
|
31869
32023
|
envVariables: envVariablesArrayToObject(envVariables),
|
|
31870
32024
|
inputProps
|
|
31871
32025
|
});
|
|
@@ -31915,6 +32069,7 @@ var RenderModal = ({
|
|
|
31915
32069
|
resolvedComposition.durationInFrames,
|
|
31916
32070
|
resolvedComposition.id,
|
|
31917
32071
|
scale,
|
|
32072
|
+
sampleRate,
|
|
31918
32073
|
separateAudioTo,
|
|
31919
32074
|
sequenceImageFormat,
|
|
31920
32075
|
startFrame,
|
|
@@ -31981,7 +32136,7 @@ var RenderModal = ({
|
|
|
31981
32136
|
enter.unregister();
|
|
31982
32137
|
};
|
|
31983
32138
|
}, [registerKeybinding, renderDisabled, trigger]);
|
|
31984
|
-
const pixelFormatOptions =
|
|
32139
|
+
const pixelFormatOptions = useMemo143(() => {
|
|
31985
32140
|
return availablePixelFormats.map((option) => {
|
|
31986
32141
|
return {
|
|
31987
32142
|
label: option,
|
|
@@ -32191,7 +32346,9 @@ var RenderModal = ({
|
|
|
32191
32346
|
setForSeamlessAacConcatenation,
|
|
32192
32347
|
separateAudioTo,
|
|
32193
32348
|
setSeparateAudioTo,
|
|
32194
|
-
outName
|
|
32349
|
+
outName,
|
|
32350
|
+
sampleRate,
|
|
32351
|
+
setSampleRate
|
|
32195
32352
|
}) : tab === "gif" ? /* @__PURE__ */ jsx272(RenderModalGif, {
|
|
32196
32353
|
everyNthFrame,
|
|
32197
32354
|
limitNumberOfGifLoops,
|
|
@@ -32278,7 +32435,7 @@ import {
|
|
|
32278
32435
|
getDefaultVideoCodecForContainer,
|
|
32279
32436
|
isAudioOnlyContainer
|
|
32280
32437
|
} from "@remotion/web-renderer";
|
|
32281
|
-
import { useCallback as useCallback145, useContext as useContext95, useMemo as
|
|
32438
|
+
import { useCallback as useCallback145, useContext as useContext95, useMemo as useMemo148, useState as useState95 } from "react";
|
|
32282
32439
|
|
|
32283
32440
|
// src/icons/certificate.tsx
|
|
32284
32441
|
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
@@ -32440,7 +32597,7 @@ var WebRendererExperimentalBadge = () => {
|
|
|
32440
32597
|
};
|
|
32441
32598
|
|
|
32442
32599
|
// src/components/RenderModal/WebRenderModalAdvanced.tsx
|
|
32443
|
-
import { useCallback as useCallback142, useMemo as
|
|
32600
|
+
import { useCallback as useCallback142, useMemo as useMemo144 } from "react";
|
|
32444
32601
|
import { jsx as jsx275, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
32445
32602
|
var tabContainer = {
|
|
32446
32603
|
flex: 1
|
|
@@ -32452,7 +32609,9 @@ var WebRenderModalAdvanced = ({
|
|
|
32452
32609
|
mediaCacheSizeInBytes,
|
|
32453
32610
|
setMediaCacheSizeInBytes,
|
|
32454
32611
|
hardwareAcceleration,
|
|
32455
|
-
setHardwareAcceleration
|
|
32612
|
+
setHardwareAcceleration,
|
|
32613
|
+
allowHtmlInCanvas,
|
|
32614
|
+
setAllowHtmlInCanvas
|
|
32456
32615
|
}) => {
|
|
32457
32616
|
const toggleCustomMediaCacheSizeInBytes = useCallback142(() => {
|
|
32458
32617
|
setMediaCacheSizeInBytes((previous) => {
|
|
@@ -32462,6 +32621,9 @@ var WebRenderModalAdvanced = ({
|
|
|
32462
32621
|
return null;
|
|
32463
32622
|
});
|
|
32464
32623
|
}, [setMediaCacheSizeInBytes]);
|
|
32624
|
+
const toggleAllowHtmlInCanvas = useCallback142(() => {
|
|
32625
|
+
setAllowHtmlInCanvas((prev) => !prev);
|
|
32626
|
+
}, [setAllowHtmlInCanvas]);
|
|
32465
32627
|
const changeMediaCacheSizeInBytes = useCallback142((cb) => {
|
|
32466
32628
|
setMediaCacheSizeInBytes((prev) => {
|
|
32467
32629
|
if (prev === null) {
|
|
@@ -32473,7 +32635,7 @@ var WebRenderModalAdvanced = ({
|
|
|
32473
32635
|
return cb;
|
|
32474
32636
|
});
|
|
32475
32637
|
}, [setMediaCacheSizeInBytes]);
|
|
32476
|
-
const hardwareAccelerationOptions =
|
|
32638
|
+
const hardwareAccelerationOptions = useMemo144(() => {
|
|
32477
32639
|
return [
|
|
32478
32640
|
{
|
|
32479
32641
|
label: "No Preference",
|
|
@@ -32573,14 +32735,39 @@ var WebRenderModalAdvanced = ({
|
|
|
32573
32735
|
})
|
|
32574
32736
|
})
|
|
32575
32737
|
]
|
|
32576
|
-
}) : null
|
|
32738
|
+
}) : null,
|
|
32739
|
+
/* @__PURE__ */ jsxs145("div", {
|
|
32740
|
+
style: optionRow,
|
|
32741
|
+
children: [
|
|
32742
|
+
/* @__PURE__ */ jsxs145("div", {
|
|
32743
|
+
style: label5,
|
|
32744
|
+
children: [
|
|
32745
|
+
"Allow HTML-in-canvas ",
|
|
32746
|
+
/* @__PURE__ */ jsx275(Spacing, {
|
|
32747
|
+
x: 0.5
|
|
32748
|
+
}),
|
|
32749
|
+
/* @__PURE__ */ jsx275(OptionExplainerBubble, {
|
|
32750
|
+
id: "allowHtmlInCanvasOption"
|
|
32751
|
+
})
|
|
32752
|
+
]
|
|
32753
|
+
}),
|
|
32754
|
+
/* @__PURE__ */ jsx275("div", {
|
|
32755
|
+
style: rightRow,
|
|
32756
|
+
children: /* @__PURE__ */ jsx275(Checkbox, {
|
|
32757
|
+
checked: allowHtmlInCanvas,
|
|
32758
|
+
onChange: toggleAllowHtmlInCanvas,
|
|
32759
|
+
name: "allow-html-in-canvas"
|
|
32760
|
+
})
|
|
32761
|
+
})
|
|
32762
|
+
]
|
|
32763
|
+
})
|
|
32577
32764
|
]
|
|
32578
32765
|
});
|
|
32579
32766
|
};
|
|
32580
32767
|
|
|
32581
32768
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
32582
32769
|
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
32583
|
-
import { useMemo as
|
|
32770
|
+
import { useMemo as useMemo145 } from "react";
|
|
32584
32771
|
|
|
32585
32772
|
// src/components/RenderModal/quality-options.tsx
|
|
32586
32773
|
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
@@ -32653,8 +32840,8 @@ var WebRenderModalAudio = ({
|
|
|
32653
32840
|
encodableCodecs,
|
|
32654
32841
|
effectiveAudioCodec
|
|
32655
32842
|
}) => {
|
|
32656
|
-
const containerSupported =
|
|
32657
|
-
const audioCodecOptions =
|
|
32843
|
+
const containerSupported = useMemo145(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
32844
|
+
const audioCodecOptions = useMemo145(() => {
|
|
32658
32845
|
return containerSupported.map((codec) => {
|
|
32659
32846
|
const isEncodable = encodableCodecs.includes(codec);
|
|
32660
32847
|
return {
|
|
@@ -32671,7 +32858,7 @@ var WebRenderModalAudio = ({
|
|
|
32671
32858
|
};
|
|
32672
32859
|
});
|
|
32673
32860
|
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
32674
|
-
const audioBitrateOptions =
|
|
32861
|
+
const audioBitrateOptions = useMemo145(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
32675
32862
|
const isAudioOnly = renderMode === "audio";
|
|
32676
32863
|
const showAudioSettings = isAudioOnly || !muted;
|
|
32677
32864
|
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
@@ -32748,7 +32935,7 @@ var WebRenderModalAudio = ({
|
|
|
32748
32935
|
};
|
|
32749
32936
|
|
|
32750
32937
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
32751
|
-
import { useMemo as
|
|
32938
|
+
import { useMemo as useMemo146 } from "react";
|
|
32752
32939
|
import { jsx as jsx278, jsxs as jsxs147, Fragment as Fragment49 } from "react/jsx-runtime";
|
|
32753
32940
|
var tabContainer2 = {
|
|
32754
32941
|
flex: 1
|
|
@@ -32802,7 +32989,7 @@ var WebRenderModalBasic = ({
|
|
|
32802
32989
|
logLevel,
|
|
32803
32990
|
setLogLevel
|
|
32804
32991
|
}) => {
|
|
32805
|
-
const imageFormatOptions =
|
|
32992
|
+
const imageFormatOptions = useMemo146(() => {
|
|
32806
32993
|
return [
|
|
32807
32994
|
{
|
|
32808
32995
|
label: "PNG",
|
|
@@ -32824,7 +33011,7 @@ var WebRenderModalBasic = ({
|
|
|
32824
33011
|
}
|
|
32825
33012
|
];
|
|
32826
33013
|
}, [imageFormat, setStillFormat]);
|
|
32827
|
-
const logLevelOptions =
|
|
33014
|
+
const logLevelOptions = useMemo146(() => {
|
|
32828
33015
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
32829
33016
|
return {
|
|
32830
33017
|
label: humanReadableLogLevel(level),
|
|
@@ -32839,7 +33026,7 @@ var WebRenderModalBasic = ({
|
|
|
32839
33026
|
};
|
|
32840
33027
|
});
|
|
32841
33028
|
}, [logLevel, setLogLevel]);
|
|
32842
|
-
const containerOptions =
|
|
33029
|
+
const containerOptions = useMemo146(() => {
|
|
32843
33030
|
const containers = renderMode === "audio" ? audioContainers : videoContainers;
|
|
32844
33031
|
return containers.map((c) => ({
|
|
32845
33032
|
label: containerLabels[c],
|
|
@@ -32853,7 +33040,7 @@ var WebRenderModalBasic = ({
|
|
|
32853
33040
|
value: c
|
|
32854
33041
|
}));
|
|
32855
33042
|
}, [container61, setContainerFormat, renderMode]);
|
|
32856
|
-
const codecOptions =
|
|
33043
|
+
const codecOptions = useMemo146(() => {
|
|
32857
33044
|
return encodableVideoCodecs.map((c) => ({
|
|
32858
33045
|
label: codecLabels[c],
|
|
32859
33046
|
onClick: () => setCodec(c),
|
|
@@ -33443,7 +33630,7 @@ var WebRenderModalLicense = ({
|
|
|
33443
33630
|
};
|
|
33444
33631
|
|
|
33445
33632
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
33446
|
-
import { useCallback as useCallback144, useMemo as
|
|
33633
|
+
import { useCallback as useCallback144, useMemo as useMemo147 } from "react";
|
|
33447
33634
|
import { jsx as jsx282, jsxs as jsxs150, Fragment as Fragment51 } from "react/jsx-runtime";
|
|
33448
33635
|
var tabContainer4 = {
|
|
33449
33636
|
flex: 1
|
|
@@ -33461,7 +33648,7 @@ var WebRenderModalPicture = ({
|
|
|
33461
33648
|
compositionWidth,
|
|
33462
33649
|
compositionHeight
|
|
33463
33650
|
}) => {
|
|
33464
|
-
const qualityOptions =
|
|
33651
|
+
const qualityOptions = useMemo147(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
33465
33652
|
const onTransparentChanged = useCallback144((e) => {
|
|
33466
33653
|
setTransparent(e.target.checked);
|
|
33467
33654
|
}, [setTransparent]);
|
|
@@ -33590,7 +33777,8 @@ var WebRenderModal = ({
|
|
|
33590
33777
|
initialHardwareAcceleration,
|
|
33591
33778
|
initialKeyframeIntervalInSeconds,
|
|
33592
33779
|
initialTransparent,
|
|
33593
|
-
initialMuted
|
|
33780
|
+
initialMuted,
|
|
33781
|
+
initialAllowHtmlInCanvas
|
|
33594
33782
|
}) => {
|
|
33595
33783
|
const context = useContext95(ResolvedCompositionContext);
|
|
33596
33784
|
const { setSelectedModal } = useContext95(ModalsContext);
|
|
@@ -33630,27 +33818,28 @@ var WebRenderModal = ({
|
|
|
33630
33818
|
const [muted, setMuted] = useState95(initialMuted ?? false);
|
|
33631
33819
|
const [scale, setScale] = useState95(initialScale ?? 1);
|
|
33632
33820
|
const [licenseKey, setLicenseKey] = useState95(initialLicenseKey);
|
|
33821
|
+
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
|
|
33633
33822
|
const encodableAudioCodecs = useEncodableAudioCodecs(container61);
|
|
33634
33823
|
const encodableVideoCodecs = useEncodableVideoCodecs(container61);
|
|
33635
|
-
const effectiveAudioCodec =
|
|
33824
|
+
const effectiveAudioCodec = useMemo148(() => {
|
|
33636
33825
|
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
33637
33826
|
return audioCodec;
|
|
33638
33827
|
}
|
|
33639
33828
|
return encodableAudioCodecs[0] ?? audioCodec;
|
|
33640
33829
|
}, [audioCodec, encodableAudioCodecs]);
|
|
33641
|
-
const effectiveVideoCodec =
|
|
33830
|
+
const effectiveVideoCodec = useMemo148(() => {
|
|
33642
33831
|
if (encodableVideoCodecs.includes(codec)) {
|
|
33643
33832
|
return codec;
|
|
33644
33833
|
}
|
|
33645
33834
|
return encodableVideoCodecs[0] ?? codec;
|
|
33646
33835
|
}, [codec, encodableVideoCodecs]);
|
|
33647
|
-
const finalEndFrame =
|
|
33836
|
+
const finalEndFrame = useMemo148(() => {
|
|
33648
33837
|
if (endFrame === null) {
|
|
33649
33838
|
return resolvedComposition.durationInFrames - 1;
|
|
33650
33839
|
}
|
|
33651
33840
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
33652
33841
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
33653
|
-
const finalStartFrame =
|
|
33842
|
+
const finalStartFrame = useMemo148(() => {
|
|
33654
33843
|
if (startFrame === null) {
|
|
33655
33844
|
return 0;
|
|
33656
33845
|
}
|
|
@@ -33715,7 +33904,7 @@ var WebRenderModal = ({
|
|
|
33715
33904
|
setTab((prev) => prev === "audio" ? "general" : prev);
|
|
33716
33905
|
}
|
|
33717
33906
|
}, [container61, imageFormat, updateOutNameExtension]);
|
|
33718
|
-
const renderTabOptions =
|
|
33907
|
+
const renderTabOptions = useMemo148(() => {
|
|
33719
33908
|
const options = [
|
|
33720
33909
|
{
|
|
33721
33910
|
label: "Still",
|
|
@@ -33761,7 +33950,7 @@ var WebRenderModal = ({
|
|
|
33761
33950
|
const onOutNameChange = useCallback145((e) => {
|
|
33762
33951
|
setOutName(e.target.value);
|
|
33763
33952
|
}, []);
|
|
33764
|
-
const outnameValidation =
|
|
33953
|
+
const outnameValidation = useMemo148(() => {
|
|
33765
33954
|
if (renderMode === "still") {
|
|
33766
33955
|
return validateOutnameForStill({
|
|
33767
33956
|
outName,
|
|
@@ -33822,7 +34011,8 @@ var WebRenderModal = ({
|
|
|
33822
34011
|
mediaCacheSizeInBytes,
|
|
33823
34012
|
logLevel,
|
|
33824
34013
|
licenseKey,
|
|
33825
|
-
scale
|
|
34014
|
+
scale,
|
|
34015
|
+
allowHtmlInCanvas
|
|
33826
34016
|
}, compositionRef);
|
|
33827
34017
|
} else {
|
|
33828
34018
|
addClientVideoJob({
|
|
@@ -33845,7 +34035,8 @@ var WebRenderModal = ({
|
|
|
33845
34035
|
mediaCacheSizeInBytes,
|
|
33846
34036
|
logLevel,
|
|
33847
34037
|
licenseKey,
|
|
33848
|
-
scale
|
|
34038
|
+
scale,
|
|
34039
|
+
allowHtmlInCanvas
|
|
33849
34040
|
}, compositionRef);
|
|
33850
34041
|
}
|
|
33851
34042
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
@@ -33885,7 +34076,8 @@ var WebRenderModal = ({
|
|
|
33885
34076
|
setSelectedModal,
|
|
33886
34077
|
addClientStillJob,
|
|
33887
34078
|
addClientVideoJob,
|
|
33888
|
-
scale
|
|
34079
|
+
scale,
|
|
34080
|
+
allowHtmlInCanvas
|
|
33889
34081
|
]);
|
|
33890
34082
|
return /* @__PURE__ */ jsxs151("div", {
|
|
33891
34083
|
style: outerModalStyle,
|
|
@@ -34080,7 +34272,9 @@ var WebRenderModal = ({
|
|
|
34080
34272
|
mediaCacheSizeInBytes,
|
|
34081
34273
|
setMediaCacheSizeInBytes,
|
|
34082
34274
|
hardwareAcceleration,
|
|
34083
|
-
setHardwareAcceleration
|
|
34275
|
+
setHardwareAcceleration,
|
|
34276
|
+
allowHtmlInCanvas,
|
|
34277
|
+
setAllowHtmlInCanvas
|
|
34084
34278
|
}) : /* @__PURE__ */ jsx283(WebRenderModalLicense, {
|
|
34085
34279
|
licenseKey,
|
|
34086
34280
|
setLicenseKey,
|
|
@@ -34104,7 +34298,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
34104
34298
|
};
|
|
34105
34299
|
|
|
34106
34300
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
34107
|
-
import { useCallback as useCallback148, useMemo as
|
|
34301
|
+
import { useCallback as useCallback148, useMemo as useMemo150 } from "react";
|
|
34108
34302
|
|
|
34109
34303
|
// src/components/CopyButton.tsx
|
|
34110
34304
|
import { useCallback as useCallback146, useEffect as useEffect87, useState as useState96 } from "react";
|
|
@@ -34170,7 +34364,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
|
|
|
34170
34364
|
};
|
|
34171
34365
|
|
|
34172
34366
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
34173
|
-
import { useCallback as useCallback147, useMemo as
|
|
34367
|
+
import { useCallback as useCallback147, useMemo as useMemo149, useState as useState97 } from "react";
|
|
34174
34368
|
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
34175
34369
|
var svgStyle2 = {
|
|
34176
34370
|
width: "11px",
|
|
@@ -34190,7 +34384,7 @@ var OpenIssueButton = ({ link: link4 }) => {
|
|
|
34190
34384
|
const handleClick = useCallback147(() => {
|
|
34191
34385
|
window.open(link4, "_blank");
|
|
34192
34386
|
}, [link4]);
|
|
34193
|
-
const svgFillColor =
|
|
34387
|
+
const svgFillColor = useMemo149(() => {
|
|
34194
34388
|
return hovered ? "white" : LIGHT_TEXT;
|
|
34195
34389
|
}, [hovered]);
|
|
34196
34390
|
const openInEditorSvg = /* @__PURE__ */ jsx285("svg", {
|
|
@@ -34287,7 +34481,7 @@ var commands = {
|
|
|
34287
34481
|
unknown: "npx remotion upgrade"
|
|
34288
34482
|
};
|
|
34289
34483
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
34290
|
-
const hasKnownBugs =
|
|
34484
|
+
const hasKnownBugs = useMemo150(() => {
|
|
34291
34485
|
return knownBugs && knownBugs?.length > 0;
|
|
34292
34486
|
}, [knownBugs]);
|
|
34293
34487
|
const command = commands[info.packageManager];
|
|
@@ -34451,6 +34645,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
34451
34645
|
renderTypeOfLastRender: modalContextType.renderTypeOfLastRender,
|
|
34452
34646
|
defaultMetadata: modalContextType.defaulMetadata,
|
|
34453
34647
|
initialHardwareAcceleration: modalContextType.initialHardwareAcceleration,
|
|
34648
|
+
initialSampleRate: modalContextType.initialSampleRate,
|
|
34454
34649
|
initialChromeMode: modalContextType.initialChromeMode,
|
|
34455
34650
|
renderDefaults: modalContextType.renderDefaults
|
|
34456
34651
|
}) : null,
|
|
@@ -34495,7 +34690,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
34495
34690
|
const onMounted = useCallback149(() => {
|
|
34496
34691
|
setCanvasMounted(true);
|
|
34497
34692
|
}, []);
|
|
34498
|
-
const value =
|
|
34693
|
+
const value = useMemo151(() => {
|
|
34499
34694
|
if (!size4) {
|
|
34500
34695
|
return null;
|
|
34501
34696
|
}
|
|
@@ -34504,15 +34699,15 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
34504
34699
|
canvasSize: size4
|
|
34505
34700
|
};
|
|
34506
34701
|
}, [size4]);
|
|
34507
|
-
const MemoRoot =
|
|
34702
|
+
const MemoRoot = useMemo151(() => {
|
|
34508
34703
|
return React187.memo(Root);
|
|
34509
34704
|
}, [Root]);
|
|
34510
34705
|
const [renderError, setRenderError] = useState98(null);
|
|
34511
34706
|
const clearError = useCallback149(() => {
|
|
34512
34707
|
setRenderError(null);
|
|
34513
34708
|
}, []);
|
|
34514
|
-
const compositionRenderErrorContextValue =
|
|
34515
|
-
const renderErrorContextValue =
|
|
34709
|
+
const compositionRenderErrorContextValue = useMemo151(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
34710
|
+
const renderErrorContextValue = useMemo151(() => ({ error: renderError }), [renderError]);
|
|
34516
34711
|
return /* @__PURE__ */ jsx289(HigherZIndex, {
|
|
34517
34712
|
onEscape: noop,
|
|
34518
34713
|
onOutsideClick: noop,
|
|
@@ -34563,7 +34758,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
34563
34758
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
34564
34759
|
|
|
34565
34760
|
// src/state/preview-size.tsx
|
|
34566
|
-
import { useCallback as useCallback150, useContext as useContext97, useMemo as
|
|
34761
|
+
import { useCallback as useCallback150, useContext as useContext97, useMemo as useMemo152, useState as useState99 } from "react";
|
|
34567
34762
|
import { Internals as Internals66 } from "remotion";
|
|
34568
34763
|
import { jsx as jsx290 } from "react/jsx-runtime";
|
|
34569
34764
|
var key5 = "remotion.previewSize";
|
|
@@ -34599,7 +34794,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
34599
34794
|
return newVal;
|
|
34600
34795
|
});
|
|
34601
34796
|
}, []);
|
|
34602
|
-
const previewSizeCtx =
|
|
34797
|
+
const previewSizeCtx = useMemo152(() => {
|
|
34603
34798
|
return {
|
|
34604
34799
|
size: editorZoomGestures ? size4 : {
|
|
34605
34800
|
size: size4.size,
|
|
@@ -34620,7 +34815,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
34620
34815
|
};
|
|
34621
34816
|
|
|
34622
34817
|
// src/components/CheckerboardProvider.tsx
|
|
34623
|
-
import { useCallback as useCallback151, useMemo as
|
|
34818
|
+
import { useCallback as useCallback151, useMemo as useMemo153, useState as useState100 } from "react";
|
|
34624
34819
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
34625
34820
|
var CheckerboardProvider = ({ children }) => {
|
|
34626
34821
|
const [checkerboard, setCheckerboardState] = useState100(() => loadCheckerboardOption());
|
|
@@ -34631,7 +34826,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
34631
34826
|
return newVal;
|
|
34632
34827
|
});
|
|
34633
34828
|
}, []);
|
|
34634
|
-
const checkerboardCtx =
|
|
34829
|
+
const checkerboardCtx = useMemo153(() => {
|
|
34635
34830
|
return {
|
|
34636
34831
|
checkerboard,
|
|
34637
34832
|
setCheckerboard
|
|
@@ -34644,19 +34839,19 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
34644
34839
|
};
|
|
34645
34840
|
|
|
34646
34841
|
// src/components/MediaVolumeProvider.tsx
|
|
34647
|
-
import { useMemo as
|
|
34842
|
+
import { useMemo as useMemo154, useState as useState101 } from "react";
|
|
34648
34843
|
import { Internals as Internals67 } from "remotion";
|
|
34649
34844
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
34650
34845
|
var MediaVolumeProvider = ({ children }) => {
|
|
34651
34846
|
const [mediaMuted, setMediaMuted] = useState101(() => loadMuteOption());
|
|
34652
34847
|
const [mediaVolume, setMediaVolume] = useState101(1);
|
|
34653
|
-
const mediaVolumeContextValue =
|
|
34848
|
+
const mediaVolumeContextValue = useMemo154(() => {
|
|
34654
34849
|
return {
|
|
34655
34850
|
mediaMuted,
|
|
34656
34851
|
mediaVolume
|
|
34657
34852
|
};
|
|
34658
34853
|
}, [mediaMuted, mediaVolume]);
|
|
34659
|
-
const setMediaVolumeContextValue =
|
|
34854
|
+
const setMediaVolumeContextValue = useMemo154(() => {
|
|
34660
34855
|
return {
|
|
34661
34856
|
setMediaMuted,
|
|
34662
34857
|
setMediaVolume
|
|
@@ -34672,11 +34867,11 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
34672
34867
|
};
|
|
34673
34868
|
|
|
34674
34869
|
// src/components/ModalsProvider.tsx
|
|
34675
|
-
import { useMemo as
|
|
34870
|
+
import { useMemo as useMemo155, useState as useState102 } from "react";
|
|
34676
34871
|
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
34677
34872
|
var ModalsProvider = ({ children }) => {
|
|
34678
34873
|
const [modalContextType, setModalContextType] = useState102(null);
|
|
34679
|
-
const modalsContext =
|
|
34874
|
+
const modalsContext = useMemo155(() => {
|
|
34680
34875
|
return {
|
|
34681
34876
|
selectedModal: modalContextType,
|
|
34682
34877
|
setSelectedModal: setModalContextType
|
|
@@ -34689,7 +34884,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
34689
34884
|
};
|
|
34690
34885
|
|
|
34691
34886
|
// src/components/SetTimelineInOutProvider.tsx
|
|
34692
|
-
import { useEffect as useEffect88, useMemo as
|
|
34887
|
+
import { useEffect as useEffect88, useMemo as useMemo156, useState as useState103 } from "react";
|
|
34693
34888
|
|
|
34694
34889
|
// src/state/marks.ts
|
|
34695
34890
|
var localStorageKey5 = () => `remotion.editor.marksv2`;
|
|
@@ -34708,7 +34903,7 @@ var loadMarks = () => {
|
|
|
34708
34903
|
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
34709
34904
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
34710
34905
|
const [inAndOutFrames, setInAndOutFrames] = useState103(() => loadMarks());
|
|
34711
|
-
const setTimelineInOutContextValue =
|
|
34906
|
+
const setTimelineInOutContextValue = useMemo156(() => {
|
|
34712
34907
|
return {
|
|
34713
34908
|
setInAndOutFrames
|
|
34714
34909
|
};
|
|
@@ -34726,7 +34921,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
34726
34921
|
};
|
|
34727
34922
|
|
|
34728
34923
|
// src/components/ShowGuidesProvider.tsx
|
|
34729
|
-
import { useCallback as useCallback152, useMemo as
|
|
34924
|
+
import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState104 } from "react";
|
|
34730
34925
|
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
34731
34926
|
var ShowGuidesProvider = ({ children }) => {
|
|
34732
34927
|
const [guidesList, setGuidesList] = useState104(() => loadGuidesList());
|
|
@@ -34742,7 +34937,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
34742
34937
|
return newVal;
|
|
34743
34938
|
});
|
|
34744
34939
|
}, []);
|
|
34745
|
-
const editorShowGuidesCtx =
|
|
34940
|
+
const editorShowGuidesCtx = useMemo157(() => {
|
|
34746
34941
|
return {
|
|
34747
34942
|
editorShowGuides,
|
|
34748
34943
|
setEditorShowGuides,
|
|
@@ -34769,7 +34964,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
34769
34964
|
};
|
|
34770
34965
|
|
|
34771
34966
|
// src/components/ShowRulersProvider.tsx
|
|
34772
|
-
import { useCallback as useCallback153, useMemo as
|
|
34967
|
+
import { useCallback as useCallback153, useMemo as useMemo158, useState as useState105 } from "react";
|
|
34773
34968
|
import { jsx as jsx296 } from "react/jsx-runtime";
|
|
34774
34969
|
var ShowRulersProvider = ({ children }) => {
|
|
34775
34970
|
const [editorShowRulers, setEditorShowRulersState] = useState105(() => loadEditorShowRulersOption());
|
|
@@ -34780,7 +34975,7 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
34780
34975
|
return newVal;
|
|
34781
34976
|
});
|
|
34782
34977
|
}, []);
|
|
34783
|
-
const editorShowRulersCtx =
|
|
34978
|
+
const editorShowRulersCtx = useMemo158(() => {
|
|
34784
34979
|
return {
|
|
34785
34980
|
editorShowRulers,
|
|
34786
34981
|
setEditorShowRulers
|
|
@@ -34812,7 +35007,7 @@ var VisualControlsUndoSync = () => {
|
|
|
34812
35007
|
};
|
|
34813
35008
|
|
|
34814
35009
|
// src/components/ZoomGesturesProvider.tsx
|
|
34815
|
-
import { useCallback as useCallback154, useMemo as
|
|
35010
|
+
import { useCallback as useCallback154, useMemo as useMemo159, useState as useState106 } from "react";
|
|
34816
35011
|
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
34817
35012
|
var ZoomGesturesProvider = ({ children }) => {
|
|
34818
35013
|
const [editorZoomGestures, setEditorZoomGesturesState] = useState106(() => loadEditorZoomGesturesOption());
|
|
@@ -34823,7 +35018,7 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
34823
35018
|
return newVal;
|
|
34824
35019
|
});
|
|
34825
35020
|
}, []);
|
|
34826
|
-
const editorZoomGesturesCtx =
|
|
35021
|
+
const editorZoomGesturesCtx = useMemo159(() => {
|
|
34827
35022
|
return {
|
|
34828
35023
|
editorZoomGestures,
|
|
34829
35024
|
setEditorZoomGestures
|
|
@@ -34960,7 +35155,7 @@ var ServerDisconnected = () => {
|
|
|
34960
35155
|
};
|
|
34961
35156
|
|
|
34962
35157
|
// src/FastRefreshProvider.tsx
|
|
34963
|
-
import { useCallback as useCallback155, useEffect as useEffect90, useMemo as
|
|
35158
|
+
import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState107 } from "react";
|
|
34964
35159
|
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
34965
35160
|
var FastRefreshProvider = ({ children }) => {
|
|
34966
35161
|
const [fastRefreshes, setFastRefreshes] = useState107(0);
|
|
@@ -34979,7 +35174,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
34979
35174
|
}
|
|
34980
35175
|
}
|
|
34981
35176
|
}, []);
|
|
34982
|
-
const value =
|
|
35177
|
+
const value = useMemo160(() => ({ fastRefreshes, manualRefreshes, increaseManualRefreshes }), [fastRefreshes, manualRefreshes, increaseManualRefreshes]);
|
|
34983
35178
|
return /* @__PURE__ */ jsx300(FastRefreshContext.Provider, {
|
|
34984
35179
|
value,
|
|
34985
35180
|
children
|
|
@@ -35154,7 +35349,7 @@ import {
|
|
|
35154
35349
|
useContext as useContext100,
|
|
35155
35350
|
useEffect as useEffect91,
|
|
35156
35351
|
useImperativeHandle as useImperativeHandle14,
|
|
35157
|
-
useMemo as
|
|
35352
|
+
useMemo as useMemo161,
|
|
35158
35353
|
useState as useState108
|
|
35159
35354
|
} from "react";
|
|
35160
35355
|
import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
|
|
@@ -35164,20 +35359,20 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35164
35359
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
|
|
35165
35360
|
const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
|
|
35166
35361
|
if (manualRefreshes) {}
|
|
35167
|
-
const selectedComposition =
|
|
35362
|
+
const selectedComposition = useMemo161(() => {
|
|
35168
35363
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
35169
35364
|
}, [canvasContent, compositions]);
|
|
35170
35365
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
35171
35366
|
const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
|
|
35172
35367
|
const env = Internals69.getRemotionEnvironment();
|
|
35173
|
-
const inputProps =
|
|
35368
|
+
const inputProps = useMemo161(() => {
|
|
35174
35369
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
35175
35370
|
}, [env.isPlayer]);
|
|
35176
35371
|
const [resolvedConfigs, setResolvedConfigs] = useState108({});
|
|
35177
|
-
const selectedEditorProps =
|
|
35372
|
+
const selectedEditorProps = useMemo161(() => {
|
|
35178
35373
|
return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
|
|
35179
35374
|
}, [allEditorProps, selectedComposition]);
|
|
35180
|
-
const renderModalProps =
|
|
35375
|
+
const renderModalProps = useMemo161(() => {
|
|
35181
35376
|
return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};
|
|
35182
35377
|
}, [allEditorProps, renderModalComposition]);
|
|
35183
35378
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -35314,13 +35509,13 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35314
35509
|
inputProps
|
|
35315
35510
|
]);
|
|
35316
35511
|
const isTheSame = selectedComposition?.id === renderModalComposition?.id;
|
|
35317
|
-
const currentDefaultProps =
|
|
35512
|
+
const currentDefaultProps = useMemo161(() => {
|
|
35318
35513
|
return {
|
|
35319
35514
|
...selectedComposition?.defaultProps ?? {},
|
|
35320
35515
|
...selectedEditorProps ?? {}
|
|
35321
35516
|
};
|
|
35322
35517
|
}, [selectedComposition?.defaultProps, selectedEditorProps]);
|
|
35323
|
-
const originalProps =
|
|
35518
|
+
const originalProps = useMemo161(() => {
|
|
35324
35519
|
return {
|
|
35325
35520
|
...currentDefaultProps,
|
|
35326
35521
|
...inputProps ?? {}
|
|
@@ -35389,7 +35584,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35389
35584
|
renderModalComposition,
|
|
35390
35585
|
renderModalProps
|
|
35391
35586
|
]);
|
|
35392
|
-
const resolvedConfigsIncludingStaticOnes =
|
|
35587
|
+
const resolvedConfigsIncludingStaticOnes = useMemo161(() => {
|
|
35393
35588
|
const staticComps = compositions.filter((c) => {
|
|
35394
35589
|
return c.calculateMetadata === null;
|
|
35395
35590
|
});
|