@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
|
@@ -10,7 +10,7 @@ import { Internals as Internals70 } from "remotion";
|
|
|
10
10
|
|
|
11
11
|
// src/components/Editor.tsx
|
|
12
12
|
import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
|
|
13
|
-
import React187, { useCallback as useCallback149, useMemo as
|
|
13
|
+
import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState98 } from "react";
|
|
14
14
|
import { Internals as Internals65 } from "remotion";
|
|
15
15
|
|
|
16
16
|
// src/helpers/colors.ts
|
|
@@ -2440,6 +2440,34 @@ var MenuSubItem = ({
|
|
|
2440
2440
|
});
|
|
2441
2441
|
};
|
|
2442
2442
|
|
|
2443
|
+
// src/components/NewComposition/menu-typeahead.ts
|
|
2444
|
+
var getLabelToMatch = (value) => {
|
|
2445
|
+
if (value.type === "divider" || value.disabled) {
|
|
2446
|
+
return null;
|
|
2447
|
+
}
|
|
2448
|
+
if (typeof value.label === "string") {
|
|
2449
|
+
return value.label;
|
|
2450
|
+
}
|
|
2451
|
+
return null;
|
|
2452
|
+
};
|
|
2453
|
+
var findTypeaheadMenuItem = ({
|
|
2454
|
+
query,
|
|
2455
|
+
values
|
|
2456
|
+
}) => {
|
|
2457
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
2458
|
+
if (normalizedQuery.length === 0) {
|
|
2459
|
+
return null;
|
|
2460
|
+
}
|
|
2461
|
+
const matched = values.find((value) => {
|
|
2462
|
+
const label = getLabelToMatch(value);
|
|
2463
|
+
return label ? label.toLowerCase().startsWith(normalizedQuery) : false;
|
|
2464
|
+
});
|
|
2465
|
+
if (!matched || matched.type === "divider") {
|
|
2466
|
+
return null;
|
|
2467
|
+
}
|
|
2468
|
+
return matched.id;
|
|
2469
|
+
};
|
|
2470
|
+
|
|
2443
2471
|
// src/components/NewComposition/MenuContent.tsx
|
|
2444
2472
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2445
2473
|
var BORDER_SIZE = 1;
|
|
@@ -2467,6 +2495,8 @@ var MenuContent = ({
|
|
|
2467
2495
|
const containerRef = useRef8(null);
|
|
2468
2496
|
const isMobileLayout = useMobileLayout();
|
|
2469
2497
|
const [subMenuActivated, setSubMenuActivated] = useState12(false);
|
|
2498
|
+
const typeaheadQueryRef = useRef8("");
|
|
2499
|
+
const typeaheadTimeoutRef = useRef8(null);
|
|
2470
2500
|
if (values[0].type === "divider") {
|
|
2471
2501
|
throw new Error("first value cant be divide");
|
|
2472
2502
|
}
|
|
@@ -2477,6 +2507,13 @@ var MenuContent = ({
|
|
|
2477
2507
|
const onItemSelected = useCallback11((id) => {
|
|
2478
2508
|
setSelectedItem(id);
|
|
2479
2509
|
}, []);
|
|
2510
|
+
const clearTypeahead = useCallback11(() => {
|
|
2511
|
+
typeaheadQueryRef.current = "";
|
|
2512
|
+
if (typeaheadTimeoutRef.current !== null) {
|
|
2513
|
+
window.clearTimeout(typeaheadTimeoutRef.current);
|
|
2514
|
+
typeaheadTimeoutRef.current = null;
|
|
2515
|
+
}
|
|
2516
|
+
}, []);
|
|
2480
2517
|
const isItemSelectable = useCallback11((v) => {
|
|
2481
2518
|
return v.type !== "divider" && !v.disabled;
|
|
2482
2519
|
}, []);
|
|
@@ -2550,6 +2587,30 @@ var MenuContent = ({
|
|
|
2550
2587
|
}
|
|
2551
2588
|
setSubMenuActivated("without-mouse");
|
|
2552
2589
|
}, [onNextMenu, selectedItem, values]);
|
|
2590
|
+
const onTypeahead = useCallback11((event) => {
|
|
2591
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.key.length !== 1 || event.key.trim().length === 0) {
|
|
2592
|
+
return;
|
|
2593
|
+
}
|
|
2594
|
+
const { activeElement } = document;
|
|
2595
|
+
if (activeElement instanceof HTMLInputElement || activeElement instanceof HTMLTextAreaElement) {
|
|
2596
|
+
return;
|
|
2597
|
+
}
|
|
2598
|
+
typeaheadQueryRef.current = `${typeaheadQueryRef.current}${event.key}`;
|
|
2599
|
+
const matchedId = findTypeaheadMenuItem({
|
|
2600
|
+
query: typeaheadQueryRef.current,
|
|
2601
|
+
values
|
|
2602
|
+
});
|
|
2603
|
+
if (matchedId !== null) {
|
|
2604
|
+
setSelectedItem(matchedId);
|
|
2605
|
+
}
|
|
2606
|
+
if (typeaheadTimeoutRef.current !== null) {
|
|
2607
|
+
window.clearTimeout(typeaheadTimeoutRef.current);
|
|
2608
|
+
}
|
|
2609
|
+
typeaheadTimeoutRef.current = window.setTimeout(() => {
|
|
2610
|
+
typeaheadQueryRef.current = "";
|
|
2611
|
+
typeaheadTimeoutRef.current = null;
|
|
2612
|
+
}, 700);
|
|
2613
|
+
}, [values]);
|
|
2553
2614
|
const containerWithHeight = useMemo15(() => {
|
|
2554
2615
|
const containerStyles = { ...container6 };
|
|
2555
2616
|
if (fixedHeight === null) {
|
|
@@ -2562,6 +2623,24 @@ var MenuContent = ({
|
|
|
2562
2623
|
}
|
|
2563
2624
|
return containerStyles;
|
|
2564
2625
|
}, [fixedHeight, isMobileLayout]);
|
|
2626
|
+
useEffect10(() => {
|
|
2627
|
+
if (!keybindings.isHighestContext || !process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
2628
|
+
return;
|
|
2629
|
+
}
|
|
2630
|
+
const onKeyDown = (event) => {
|
|
2631
|
+
onTypeahead(event);
|
|
2632
|
+
};
|
|
2633
|
+
window.addEventListener("keydown", onKeyDown);
|
|
2634
|
+
return () => {
|
|
2635
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
2636
|
+
clearTypeahead();
|
|
2637
|
+
};
|
|
2638
|
+
}, [clearTypeahead, keybindings.isHighestContext, onTypeahead]);
|
|
2639
|
+
useEffect10(() => {
|
|
2640
|
+
return () => {
|
|
2641
|
+
clearTypeahead();
|
|
2642
|
+
};
|
|
2643
|
+
}, [clearTypeahead]);
|
|
2565
2644
|
useEffect10(() => {
|
|
2566
2645
|
const escapeBinding = keybindings.registerKeybinding({
|
|
2567
2646
|
event: "keydown",
|
|
@@ -3033,6 +3112,7 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
3033
3112
|
renderTypeOfLastRender: null,
|
|
3034
3113
|
defaulMetadata: defaults.metadata,
|
|
3035
3114
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
3115
|
+
initialSampleRate: defaults.sampleRate,
|
|
3036
3116
|
initialChromeMode: defaults.chromeMode,
|
|
3037
3117
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
3038
3118
|
renderDefaults: defaults,
|
|
@@ -3856,7 +3936,8 @@ var addVideoRenderJob = ({
|
|
|
3856
3936
|
metadata,
|
|
3857
3937
|
hardwareAcceleration,
|
|
3858
3938
|
chromeMode,
|
|
3859
|
-
mediaCacheSizeInBytes
|
|
3939
|
+
mediaCacheSizeInBytes,
|
|
3940
|
+
sampleRate
|
|
3860
3941
|
}) => {
|
|
3861
3942
|
return callApi("/api/render", {
|
|
3862
3943
|
compositionId,
|
|
@@ -3903,7 +3984,8 @@ var addVideoRenderJob = ({
|
|
|
3903
3984
|
metadata,
|
|
3904
3985
|
hardwareAcceleration,
|
|
3905
3986
|
chromeMode,
|
|
3906
|
-
mediaCacheSizeInBytes
|
|
3987
|
+
mediaCacheSizeInBytes,
|
|
3988
|
+
sampleRate
|
|
3907
3989
|
});
|
|
3908
3990
|
};
|
|
3909
3991
|
var unsubscribeFromFileExistenceWatcher = ({
|
|
@@ -16214,7 +16296,7 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16214
16296
|
if (!compositionRef) {
|
|
16215
16297
|
throw new Error(`Composition not found for job ${job.id}`);
|
|
16216
16298
|
}
|
|
16217
|
-
const
|
|
16299
|
+
const blob = await (await renderStillOnWeb({
|
|
16218
16300
|
composition: {
|
|
16219
16301
|
component: compositionRef.component,
|
|
16220
16302
|
width: compositionRef.width,
|
|
@@ -16226,15 +16308,15 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16226
16308
|
id: job.compositionId
|
|
16227
16309
|
},
|
|
16228
16310
|
frame: job.frame,
|
|
16229
|
-
imageFormat: job.imageFormat,
|
|
16230
16311
|
inputProps: job.inputProps,
|
|
16231
16312
|
delayRenderTimeoutInMilliseconds: job.delayRenderTimeout,
|
|
16232
16313
|
mediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16233
16314
|
logLevel: job.logLevel,
|
|
16234
16315
|
licenseKey: job.licenseKey ?? undefined,
|
|
16235
16316
|
scale: job.scale,
|
|
16236
|
-
signal
|
|
16237
|
-
|
|
16317
|
+
signal,
|
|
16318
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16319
|
+
})).blob({ format: job.imageFormat });
|
|
16238
16320
|
return {
|
|
16239
16321
|
getBlob: () => Promise.resolve(blob),
|
|
16240
16322
|
width: compositionRef.width,
|
|
@@ -16284,7 +16366,8 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16284
16366
|
});
|
|
16285
16367
|
},
|
|
16286
16368
|
outputTarget: "web-fs",
|
|
16287
|
-
licenseKey: job.licenseKey ?? undefined
|
|
16369
|
+
licenseKey: job.licenseKey ?? undefined,
|
|
16370
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16288
16371
|
});
|
|
16289
16372
|
return {
|
|
16290
16373
|
getBlob,
|
|
@@ -16825,6 +16908,7 @@ var makeRetryPayload = (job) => {
|
|
|
16825
16908
|
defaulMetadata: job.metadata,
|
|
16826
16909
|
renderTypeOfLastRender: "still",
|
|
16827
16910
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
16911
|
+
initialSampleRate: defaults.sampleRate,
|
|
16828
16912
|
initialChromeMode: job.chromeMode,
|
|
16829
16913
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16830
16914
|
renderDefaults: defaults,
|
|
@@ -16878,6 +16962,7 @@ var makeRetryPayload = (job) => {
|
|
|
16878
16962
|
defaulMetadata: job.metadata,
|
|
16879
16963
|
renderTypeOfLastRender: "sequence",
|
|
16880
16964
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
16965
|
+
initialSampleRate: defaults.sampleRate,
|
|
16881
16966
|
initialChromeMode: job.chromeMode,
|
|
16882
16967
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16883
16968
|
renderDefaults: defaults,
|
|
@@ -16931,6 +17016,7 @@ var makeRetryPayload = (job) => {
|
|
|
16931
17016
|
defaulMetadata: job.metadata,
|
|
16932
17017
|
renderTypeOfLastRender: "video",
|
|
16933
17018
|
initialHardwareAcceleration: job.hardwareAcceleration,
|
|
17019
|
+
initialSampleRate: job.sampleRate,
|
|
16934
17020
|
initialChromeMode: job.chromeMode,
|
|
16935
17021
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16936
17022
|
renderDefaults: defaults,
|
|
@@ -16962,7 +17048,8 @@ var makeClientRetryPayload = (job) => {
|
|
|
16962
17048
|
initialStillImageFormat: job.type === "client-still" ? job.imageFormat : "png",
|
|
16963
17049
|
initialKeyframeIntervalInSeconds: job.type === "client-video" ? job.keyframeIntervalInSeconds : null,
|
|
16964
17050
|
initialMuted: job.type === "client-video" ? job.muted : null,
|
|
16965
|
-
initialTransparent: job.type === "client-video" ? job.transparent : null
|
|
17051
|
+
initialTransparent: job.type === "client-video" ? job.transparent : null,
|
|
17052
|
+
initialAllowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16966
17053
|
};
|
|
16967
17054
|
};
|
|
16968
17055
|
|
|
@@ -18785,6 +18872,7 @@ var RenderButton = ({
|
|
|
18785
18872
|
renderTypeOfLastRender: null,
|
|
18786
18873
|
defaulMetadata: defaults.metadata,
|
|
18787
18874
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
18875
|
+
initialSampleRate: defaults.sampleRate,
|
|
18788
18876
|
initialChromeMode: defaults.chromeMode,
|
|
18789
18877
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
18790
18878
|
renderDefaults: defaults
|
|
@@ -18820,7 +18908,8 @@ var RenderButton = ({
|
|
|
18820
18908
|
initialKeyframeIntervalInSeconds: null,
|
|
18821
18909
|
initialTransparent: null,
|
|
18822
18910
|
initialMuted: null,
|
|
18823
|
-
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
|
|
18911
|
+
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
18912
|
+
initialAllowHtmlInCanvas: defaults.allowHtmlInCanvas
|
|
18824
18913
|
});
|
|
18825
18914
|
}, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
|
|
18826
18915
|
const onClick = useCallback93(() => {
|
|
@@ -27743,7 +27832,7 @@ import {
|
|
|
27743
27832
|
useCallback as useCallback141,
|
|
27744
27833
|
useContext as useContext94,
|
|
27745
27834
|
useEffect as useEffect83,
|
|
27746
|
-
useMemo as
|
|
27835
|
+
useMemo as useMemo143,
|
|
27747
27836
|
useReducer as useReducer2,
|
|
27748
27837
|
useRef as useRef49,
|
|
27749
27838
|
useState as useState91
|
|
@@ -27893,6 +27982,7 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
27893
27982
|
beepOnFinish,
|
|
27894
27983
|
repro,
|
|
27895
27984
|
metadata,
|
|
27985
|
+
sampleRate,
|
|
27896
27986
|
envVariables,
|
|
27897
27987
|
inputProps
|
|
27898
27988
|
}) => {
|
|
@@ -27980,6 +28070,9 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
27980
28070
|
if (audioCodec !== defaultAudioCodec) {
|
|
27981
28071
|
addFlagWithValue(flags, getRenderMediaFlag("audioCodec"), audioCodec);
|
|
27982
28072
|
}
|
|
28073
|
+
addValueFlagsIfChanged(flags, [
|
|
28074
|
+
renderMediaValueFlag("sampleRate", sampleRate, renderDefaults.sampleRate)
|
|
28075
|
+
]);
|
|
27983
28076
|
}
|
|
27984
28077
|
addTrueBooleanFlagsIfChanged(flags, [
|
|
27985
28078
|
renderMediaBooleanFlag("disallowParallelEncoding", disallowParallelEncoding, false),
|
|
@@ -28253,8 +28346,9 @@ var padding3 = {
|
|
|
28253
28346
|
var title6 = {
|
|
28254
28347
|
fontSize: 14
|
|
28255
28348
|
};
|
|
28349
|
+
var DESCRIPTION_FONT_SIZE_PX = 14;
|
|
28256
28350
|
var description = {
|
|
28257
|
-
fontSize:
|
|
28351
|
+
fontSize: DESCRIPTION_FONT_SIZE_PX,
|
|
28258
28352
|
maxWidth: 400
|
|
28259
28353
|
};
|
|
28260
28354
|
var link2 = {
|
|
@@ -28313,9 +28407,22 @@ var OptionExplainer = ({ option }) => {
|
|
|
28313
28407
|
}) : null
|
|
28314
28408
|
]
|
|
28315
28409
|
}),
|
|
28316
|
-
/* @__PURE__ */
|
|
28410
|
+
/* @__PURE__ */ jsxs126("div", {
|
|
28317
28411
|
style: description,
|
|
28318
|
-
children:
|
|
28412
|
+
children: [
|
|
28413
|
+
/* @__PURE__ */ jsx250("style", {
|
|
28414
|
+
children: `
|
|
28415
|
+
.__remotion-option-explainer-description a,
|
|
28416
|
+
.__remotion-option-explainer-description code {
|
|
28417
|
+
font-size: ${DESCRIPTION_FONT_SIZE_PX}px;
|
|
28418
|
+
}
|
|
28419
|
+
`
|
|
28420
|
+
}),
|
|
28421
|
+
/* @__PURE__ */ jsx250("div", {
|
|
28422
|
+
className: "__remotion-option-explainer-description",
|
|
28423
|
+
children: option.description("ssr")
|
|
28424
|
+
})
|
|
28425
|
+
]
|
|
28319
28426
|
})
|
|
28320
28427
|
]
|
|
28321
28428
|
}),
|
|
@@ -29638,7 +29745,7 @@ var RenderModalAdvanced = ({
|
|
|
29638
29745
|
|
|
29639
29746
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
29640
29747
|
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
29641
|
-
import { useCallback as useCallback134 } from "react";
|
|
29748
|
+
import { useCallback as useCallback134, useMemo as useMemo138 } from "react";
|
|
29642
29749
|
|
|
29643
29750
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
29644
29751
|
import { useCallback as useCallback131 } from "react";
|
|
@@ -29933,6 +30040,7 @@ var container55 = {
|
|
|
29933
30040
|
flex: 1,
|
|
29934
30041
|
overflowY: "auto"
|
|
29935
30042
|
};
|
|
30043
|
+
var commonSampleRates = [8000, 16000, 22050, 44100, 48000, 96000];
|
|
29936
30044
|
var RenderModalAudio = ({
|
|
29937
30045
|
muted,
|
|
29938
30046
|
setMuted,
|
|
@@ -29950,7 +30058,9 @@ var RenderModalAudio = ({
|
|
|
29950
30058
|
setForSeamlessAacConcatenation,
|
|
29951
30059
|
separateAudioTo,
|
|
29952
30060
|
setSeparateAudioTo,
|
|
29953
|
-
outName
|
|
30061
|
+
outName,
|
|
30062
|
+
sampleRate,
|
|
30063
|
+
setSampleRate
|
|
29954
30064
|
}) => {
|
|
29955
30065
|
const onShouldHaveTargetAudioBitrateChanged = useCallback134((e) => {
|
|
29956
30066
|
setShouldHaveCustomTargetAudioBitrate(e.target.checked);
|
|
@@ -29961,6 +30071,20 @@ var RenderModalAudio = ({
|
|
|
29961
30071
|
const onSeamlessAacConcatenationChanges = useCallback134((e) => {
|
|
29962
30072
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
29963
30073
|
}, [setForSeamlessAacConcatenation]);
|
|
30074
|
+
const sampleRateOptions = useMemo138(() => {
|
|
30075
|
+
return commonSampleRates.map((rate) => ({
|
|
30076
|
+
label: rate === 48000 ? `${rate} Hz (default)` : `${rate} Hz`,
|
|
30077
|
+
onClick: () => setSampleRate(rate),
|
|
30078
|
+
key: String(rate),
|
|
30079
|
+
leftItem: sampleRate === rate ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
30080
|
+
id: String(rate),
|
|
30081
|
+
keyHint: null,
|
|
30082
|
+
quickSwitcherLabel: null,
|
|
30083
|
+
subMenu: null,
|
|
30084
|
+
type: "item",
|
|
30085
|
+
value: String(rate)
|
|
30086
|
+
}));
|
|
30087
|
+
}, [sampleRate, setSampleRate]);
|
|
29964
30088
|
const audioCodecOptions = useCallback134((currentCodec) => {
|
|
29965
30089
|
return BrowserSafeApis8.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
|
|
29966
30090
|
return {
|
|
@@ -30101,6 +30225,31 @@ var RenderModalAudio = ({
|
|
|
30101
30225
|
})
|
|
30102
30226
|
})
|
|
30103
30227
|
]
|
|
30228
|
+
}) : null,
|
|
30229
|
+
renderMode !== "still" && !muted ? /* @__PURE__ */ jsxs135("div", {
|
|
30230
|
+
style: optionRow,
|
|
30231
|
+
children: [
|
|
30232
|
+
/* @__PURE__ */ jsxs135("div", {
|
|
30233
|
+
style: label5,
|
|
30234
|
+
children: [
|
|
30235
|
+
"Sample Rate ",
|
|
30236
|
+
/* @__PURE__ */ jsx263(Spacing, {
|
|
30237
|
+
x: 0.5
|
|
30238
|
+
}),
|
|
30239
|
+
/* @__PURE__ */ jsx263(OptionExplainerBubble, {
|
|
30240
|
+
id: "sampleRateOption"
|
|
30241
|
+
})
|
|
30242
|
+
]
|
|
30243
|
+
}),
|
|
30244
|
+
/* @__PURE__ */ jsx263("div", {
|
|
30245
|
+
style: rightRow,
|
|
30246
|
+
children: /* @__PURE__ */ jsx263(Combobox, {
|
|
30247
|
+
values: sampleRateOptions,
|
|
30248
|
+
selectedId: String(sampleRate),
|
|
30249
|
+
title: "Sample Rate"
|
|
30250
|
+
})
|
|
30251
|
+
})
|
|
30252
|
+
]
|
|
30104
30253
|
}) : null
|
|
30105
30254
|
]
|
|
30106
30255
|
});
|
|
@@ -30109,7 +30258,7 @@ var RenderModalAudio = ({
|
|
|
30109
30258
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
30110
30259
|
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
30111
30260
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
30112
|
-
import { useCallback as useCallback137, useMemo as
|
|
30261
|
+
import { useCallback as useCallback137, useMemo as useMemo140 } from "react";
|
|
30113
30262
|
|
|
30114
30263
|
// src/helpers/prores-labels.ts
|
|
30115
30264
|
var labelProResProfile = (profile) => {
|
|
@@ -30138,7 +30287,7 @@ var labelProResProfile = (profile) => {
|
|
|
30138
30287
|
import { useCallback as useCallback136 } from "react";
|
|
30139
30288
|
|
|
30140
30289
|
// src/components/RenderModal/MultiRangeSlider.tsx
|
|
30141
|
-
import { useCallback as useCallback135, useMemo as
|
|
30290
|
+
import { useCallback as useCallback135, useMemo as useMemo139 } from "react";
|
|
30142
30291
|
import { jsx as jsx264, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
30143
30292
|
var container56 = {
|
|
30144
30293
|
borderColor: "black",
|
|
@@ -30168,7 +30317,7 @@ var MultiRangeSlider = ({
|
|
|
30168
30317
|
onRightThumbDrag
|
|
30169
30318
|
}) => {
|
|
30170
30319
|
const getPercent = useCallback135((value) => Math.round((value - min) / (max - min) * 100), [min, max]);
|
|
30171
|
-
const rangeStyle =
|
|
30320
|
+
const rangeStyle = useMemo139(() => {
|
|
30172
30321
|
const minPercent = getPercent(start);
|
|
30173
30322
|
const maxPercent = getPercent(end);
|
|
30174
30323
|
return {
|
|
@@ -30375,7 +30524,7 @@ var RenderModalBasic = ({
|
|
|
30375
30524
|
showOutputName
|
|
30376
30525
|
}) => {
|
|
30377
30526
|
const existence = useFileExistence(outName);
|
|
30378
|
-
const videoCodecOptions =
|
|
30527
|
+
const videoCodecOptions = useMemo140(() => {
|
|
30379
30528
|
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
30380
30529
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
30381
30530
|
}).map((codecOption) => {
|
|
@@ -30393,7 +30542,7 @@ var RenderModalBasic = ({
|
|
|
30393
30542
|
};
|
|
30394
30543
|
});
|
|
30395
30544
|
}, [renderMode, setCodec, codec]);
|
|
30396
|
-
const proResProfileOptions =
|
|
30545
|
+
const proResProfileOptions = useMemo140(() => {
|
|
30397
30546
|
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
30398
30547
|
return {
|
|
30399
30548
|
label: labelProResProfile(option),
|
|
@@ -30425,7 +30574,7 @@ var RenderModalBasic = ({
|
|
|
30425
30574
|
const onValueChange = useCallback137((e) => {
|
|
30426
30575
|
setOutName(e.target.value);
|
|
30427
30576
|
}, [setOutName]);
|
|
30428
|
-
const logLevelOptions =
|
|
30577
|
+
const logLevelOptions = useMemo140(() => {
|
|
30429
30578
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
30430
30579
|
return {
|
|
30431
30580
|
label: humanReadableLogLevel(level),
|
|
@@ -30679,7 +30828,7 @@ var RenderModalGif = ({
|
|
|
30679
30828
|
|
|
30680
30829
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
30681
30830
|
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
30682
|
-
import { useCallback as useCallback140, useMemo as
|
|
30831
|
+
import { useCallback as useCallback140, useMemo as useMemo142 } from "react";
|
|
30683
30832
|
|
|
30684
30833
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
30685
30834
|
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
@@ -30698,7 +30847,7 @@ var JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
|
30698
30847
|
};
|
|
30699
30848
|
|
|
30700
30849
|
// src/components/RenderModal/ScaleSetting.tsx
|
|
30701
|
-
import { useMemo as
|
|
30850
|
+
import { useMemo as useMemo141 } from "react";
|
|
30702
30851
|
import { jsx as jsx270, jsxs as jsxs141, Fragment as Fragment46 } from "react/jsx-runtime";
|
|
30703
30852
|
var MIN_SCALE = 0.1;
|
|
30704
30853
|
var MAX_SCALE = 10;
|
|
@@ -30712,7 +30861,7 @@ var outputDimensionsStyle = {
|
|
|
30712
30861
|
marginTop: -10
|
|
30713
30862
|
};
|
|
30714
30863
|
var ScaleSetting = ({ scale, setScale, compositionWidth, compositionHeight }) => {
|
|
30715
|
-
const outputDimensions =
|
|
30864
|
+
const outputDimensions = useMemo141(() => {
|
|
30716
30865
|
const outputWidth = Math.round(compositionWidth * scale);
|
|
30717
30866
|
const outputHeight = Math.round(compositionHeight * scale);
|
|
30718
30867
|
return `${outputWidth}×${outputHeight}`;
|
|
@@ -30781,7 +30930,7 @@ var RenderModalPicture = ({
|
|
|
30781
30930
|
compositionWidth,
|
|
30782
30931
|
compositionHeight
|
|
30783
30932
|
}) => {
|
|
30784
|
-
const colorSpaceOptions =
|
|
30933
|
+
const colorSpaceOptions = useMemo142(() => {
|
|
30785
30934
|
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
30786
30935
|
return {
|
|
30787
30936
|
label: option,
|
|
@@ -30797,7 +30946,7 @@ var RenderModalPicture = ({
|
|
|
30797
30946
|
};
|
|
30798
30947
|
});
|
|
30799
30948
|
}, [colorSpace, setColorSpace]);
|
|
30800
|
-
const qualityControlOptions =
|
|
30949
|
+
const qualityControlOptions = useMemo142(() => {
|
|
30801
30950
|
return qualityControlModes.map((option) => {
|
|
30802
30951
|
return {
|
|
30803
30952
|
label: option === "crf" ? "CRF" : "Bitrate",
|
|
@@ -31119,6 +31268,7 @@ var RenderModal = ({
|
|
|
31119
31268
|
initialForSeamlessAacConcatenation,
|
|
31120
31269
|
renderTypeOfLastRender,
|
|
31121
31270
|
initialHardwareAcceleration,
|
|
31271
|
+
initialSampleRate,
|
|
31122
31272
|
defaultMetadata,
|
|
31123
31273
|
initialChromeMode,
|
|
31124
31274
|
renderDefaults
|
|
@@ -31176,6 +31326,7 @@ var RenderModal = ({
|
|
|
31176
31326
|
const [repro, setRepro] = useState91(() => initialRepro);
|
|
31177
31327
|
const [enforceAudioTrackState, setEnforceAudioTrackState] = useState91(() => initialEnforceAudioTrack);
|
|
31178
31328
|
const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState91(() => initialForSeamlessAacConcatenation);
|
|
31329
|
+
const [sampleRate, setSampleRate] = useState91(() => initialSampleRate);
|
|
31179
31330
|
const [renderMode, setRenderModeState] = useState91(initialRenderType);
|
|
31180
31331
|
const [jpegQuality, setJpegQuality] = useState91(() => initialJpegQuality);
|
|
31181
31332
|
const [scale, setScale] = useState91(() => initialScale);
|
|
@@ -31190,7 +31341,7 @@ var RenderModal = ({
|
|
|
31190
31341
|
const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
|
|
31191
31342
|
const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
|
|
31192
31343
|
const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
|
|
31193
|
-
const chromiumOptions =
|
|
31344
|
+
const chromiumOptions = useMemo143(() => {
|
|
31194
31345
|
return {
|
|
31195
31346
|
headless,
|
|
31196
31347
|
disableWebSecurity,
|
|
@@ -31232,19 +31383,19 @@ var RenderModal = ({
|
|
|
31232
31383
|
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
|
|
31233
31384
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
|
|
31234
31385
|
const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
|
|
31235
|
-
const codec =
|
|
31386
|
+
const codec = useMemo143(() => {
|
|
31236
31387
|
if (renderMode === "audio") {
|
|
31237
31388
|
return videoCodecForAudioTab;
|
|
31238
31389
|
}
|
|
31239
31390
|
return videoCodecForVideoTab;
|
|
31240
31391
|
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
31241
|
-
const numberOfGifLoops =
|
|
31392
|
+
const numberOfGifLoops = useMemo143(() => {
|
|
31242
31393
|
if (codec === "gif" && limitNumberOfGifLoops) {
|
|
31243
31394
|
return numberOfGifLoopsSetting;
|
|
31244
31395
|
}
|
|
31245
31396
|
return null;
|
|
31246
31397
|
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
31247
|
-
const audioBitrate =
|
|
31398
|
+
const audioBitrate = useMemo143(() => {
|
|
31248
31399
|
if (shouldHaveCustomTargetAudioBitrate) {
|
|
31249
31400
|
return customTargetAudioBitrate;
|
|
31250
31401
|
}
|
|
@@ -31252,10 +31403,10 @@ var RenderModal = ({
|
|
|
31252
31403
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
31253
31404
|
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
31254
31405
|
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
31255
|
-
const supportsBothQualityControls =
|
|
31406
|
+
const supportsBothQualityControls = useMemo143(() => {
|
|
31256
31407
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
31257
31408
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
31258
|
-
const qualityControlType =
|
|
31409
|
+
const qualityControlType = useMemo143(() => {
|
|
31259
31410
|
if (hardwareAcceleration === "if-possible" || hardwareAcceleration === "required") {
|
|
31260
31411
|
if (supportsVideoBitrate) {
|
|
31261
31412
|
return "bitrate";
|
|
@@ -31279,7 +31430,7 @@ var RenderModal = ({
|
|
|
31279
31430
|
supportsCrf,
|
|
31280
31431
|
supportsVideoBitrate
|
|
31281
31432
|
]);
|
|
31282
|
-
const videoBitrate =
|
|
31433
|
+
const videoBitrate = useMemo143(() => {
|
|
31283
31434
|
if (qualityControlType === "bitrate") {
|
|
31284
31435
|
return customTargetVideoBitrate;
|
|
31285
31436
|
}
|
|
@@ -31291,13 +31442,13 @@ var RenderModal = ({
|
|
|
31291
31442
|
return;
|
|
31292
31443
|
dispatch(payload);
|
|
31293
31444
|
}, []);
|
|
31294
|
-
const muted =
|
|
31445
|
+
const muted = useMemo143(() => {
|
|
31295
31446
|
if (renderMode === "video") {
|
|
31296
31447
|
return mutedState;
|
|
31297
31448
|
}
|
|
31298
31449
|
return false;
|
|
31299
31450
|
}, [mutedState, renderMode]);
|
|
31300
|
-
const enforceAudioTrack =
|
|
31451
|
+
const enforceAudioTrack = useMemo143(() => {
|
|
31301
31452
|
if (renderMode === "video") {
|
|
31302
31453
|
return enforceAudioTrackState;
|
|
31303
31454
|
}
|
|
@@ -31306,13 +31457,13 @@ var RenderModal = ({
|
|
|
31306
31457
|
}
|
|
31307
31458
|
return false;
|
|
31308
31459
|
}, [enforceAudioTrackState, renderMode]);
|
|
31309
|
-
const proResProfile =
|
|
31460
|
+
const proResProfile = useMemo143(() => {
|
|
31310
31461
|
if (renderMode === "video" && codec === "prores") {
|
|
31311
31462
|
return proResProfileSetting;
|
|
31312
31463
|
}
|
|
31313
31464
|
return null;
|
|
31314
31465
|
}, [codec, proResProfileSetting, renderMode]);
|
|
31315
|
-
const x264Preset =
|
|
31466
|
+
const x264Preset = useMemo143(() => {
|
|
31316
31467
|
if (renderMode === "video" && codec === "h264") {
|
|
31317
31468
|
return x264PresetSetting;
|
|
31318
31469
|
}
|
|
@@ -31323,19 +31474,19 @@ var RenderModal = ({
|
|
|
31323
31474
|
_setInputProps(updater);
|
|
31324
31475
|
}, []);
|
|
31325
31476
|
const [metadata] = useState91(() => defaultMetadata);
|
|
31326
|
-
const endFrame =
|
|
31477
|
+
const endFrame = useMemo143(() => {
|
|
31327
31478
|
if (endFrameOrNull === null) {
|
|
31328
31479
|
return resolvedComposition.durationInFrames - 1;
|
|
31329
31480
|
}
|
|
31330
31481
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrameOrNull));
|
|
31331
31482
|
}, [resolvedComposition.durationInFrames, endFrameOrNull]);
|
|
31332
|
-
const startFrame =
|
|
31483
|
+
const startFrame = useMemo143(() => {
|
|
31333
31484
|
if (startFrameOrNull === null) {
|
|
31334
31485
|
return 0;
|
|
31335
31486
|
}
|
|
31336
31487
|
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
31337
31488
|
}, [endFrame, startFrameOrNull]);
|
|
31338
|
-
const frame2 =
|
|
31489
|
+
const frame2 = useMemo143(() => {
|
|
31339
31490
|
const parsed = Math.floor(unclampedFrame);
|
|
31340
31491
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
31341
31492
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
@@ -31456,17 +31607,17 @@ var RenderModal = ({
|
|
|
31456
31607
|
mediaCacheSizeInBytes
|
|
31457
31608
|
]);
|
|
31458
31609
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
|
|
31459
|
-
const everyNthFrame =
|
|
31610
|
+
const everyNthFrame = useMemo143(() => {
|
|
31460
31611
|
if (codec === "gif") {
|
|
31461
31612
|
return everyNthFrameSetting;
|
|
31462
31613
|
}
|
|
31463
31614
|
return 1;
|
|
31464
31615
|
}, [codec, everyNthFrameSetting]);
|
|
31465
31616
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
31466
|
-
const availablePixelFormats =
|
|
31617
|
+
const availablePixelFormats = useMemo143(() => {
|
|
31467
31618
|
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
31468
31619
|
}, [codec]);
|
|
31469
|
-
const pixelFormat =
|
|
31620
|
+
const pixelFormat = useMemo143(() => {
|
|
31470
31621
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
31471
31622
|
return userPreferredPixelFormat;
|
|
31472
31623
|
}
|
|
@@ -31517,7 +31668,8 @@ var RenderModal = ({
|
|
|
31517
31668
|
hardwareAcceleration,
|
|
31518
31669
|
chromeMode,
|
|
31519
31670
|
offthreadVideoThreads,
|
|
31520
|
-
mediaCacheSizeInBytes
|
|
31671
|
+
mediaCacheSizeInBytes,
|
|
31672
|
+
sampleRate
|
|
31521
31673
|
}).then(() => {
|
|
31522
31674
|
dispatchIfMounted({ type: "succeed" });
|
|
31523
31675
|
setSelectedModal(null);
|
|
@@ -31569,7 +31721,8 @@ var RenderModal = ({
|
|
|
31569
31721
|
hardwareAcceleration,
|
|
31570
31722
|
chromeMode,
|
|
31571
31723
|
offthreadVideoThreads,
|
|
31572
|
-
mediaCacheSizeInBytes
|
|
31724
|
+
mediaCacheSizeInBytes,
|
|
31725
|
+
sampleRate
|
|
31573
31726
|
]);
|
|
31574
31727
|
const onClickSequence = useCallback141(() => {
|
|
31575
31728
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
@@ -31637,7 +31790,7 @@ var RenderModal = ({
|
|
|
31637
31790
|
isMounted.current = false;
|
|
31638
31791
|
};
|
|
31639
31792
|
}, []);
|
|
31640
|
-
const imageFormatOptions =
|
|
31793
|
+
const imageFormatOptions = useMemo143(() => {
|
|
31641
31794
|
if (renderMode === "still") {
|
|
31642
31795
|
return [
|
|
31643
31796
|
{
|
|
@@ -31733,7 +31886,7 @@ var RenderModal = ({
|
|
|
31733
31886
|
stillImageFormat,
|
|
31734
31887
|
videoCodecForVideoTab
|
|
31735
31888
|
]);
|
|
31736
|
-
const renderTabOptions =
|
|
31889
|
+
const renderTabOptions = useMemo143(() => {
|
|
31737
31890
|
if (resolvedComposition?.durationInFrames < 2) {
|
|
31738
31891
|
return [
|
|
31739
31892
|
{
|
|
@@ -31791,7 +31944,7 @@ var RenderModal = ({
|
|
|
31791
31944
|
});
|
|
31792
31945
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
31793
31946
|
const { registerKeybinding } = useKeybinding();
|
|
31794
|
-
const readOnlyRenderCommand =
|
|
31947
|
+
const readOnlyRenderCommand = useMemo143(() => {
|
|
31795
31948
|
if (!readOnlyStudio) {
|
|
31796
31949
|
return null;
|
|
31797
31950
|
}
|
|
@@ -31847,6 +32000,7 @@ var RenderModal = ({
|
|
|
31847
32000
|
beepOnFinish,
|
|
31848
32001
|
repro,
|
|
31849
32002
|
metadata,
|
|
32003
|
+
sampleRate,
|
|
31850
32004
|
envVariables: envVariablesArrayToObject(envVariables),
|
|
31851
32005
|
inputProps
|
|
31852
32006
|
});
|
|
@@ -31896,6 +32050,7 @@ var RenderModal = ({
|
|
|
31896
32050
|
resolvedComposition.durationInFrames,
|
|
31897
32051
|
resolvedComposition.id,
|
|
31898
32052
|
scale,
|
|
32053
|
+
sampleRate,
|
|
31899
32054
|
separateAudioTo,
|
|
31900
32055
|
sequenceImageFormat,
|
|
31901
32056
|
startFrame,
|
|
@@ -31962,7 +32117,7 @@ var RenderModal = ({
|
|
|
31962
32117
|
enter.unregister();
|
|
31963
32118
|
};
|
|
31964
32119
|
}, [registerKeybinding, renderDisabled, trigger]);
|
|
31965
|
-
const pixelFormatOptions =
|
|
32120
|
+
const pixelFormatOptions = useMemo143(() => {
|
|
31966
32121
|
return availablePixelFormats.map((option) => {
|
|
31967
32122
|
return {
|
|
31968
32123
|
label: option,
|
|
@@ -32172,7 +32327,9 @@ var RenderModal = ({
|
|
|
32172
32327
|
setForSeamlessAacConcatenation,
|
|
32173
32328
|
separateAudioTo,
|
|
32174
32329
|
setSeparateAudioTo,
|
|
32175
|
-
outName
|
|
32330
|
+
outName,
|
|
32331
|
+
sampleRate,
|
|
32332
|
+
setSampleRate
|
|
32176
32333
|
}) : tab === "gif" ? /* @__PURE__ */ jsx272(RenderModalGif, {
|
|
32177
32334
|
everyNthFrame,
|
|
32178
32335
|
limitNumberOfGifLoops,
|
|
@@ -32259,7 +32416,7 @@ import {
|
|
|
32259
32416
|
getDefaultVideoCodecForContainer,
|
|
32260
32417
|
isAudioOnlyContainer
|
|
32261
32418
|
} from "@remotion/web-renderer";
|
|
32262
|
-
import { useCallback as useCallback145, useContext as useContext95, useMemo as
|
|
32419
|
+
import { useCallback as useCallback145, useContext as useContext95, useMemo as useMemo148, useState as useState95 } from "react";
|
|
32263
32420
|
|
|
32264
32421
|
// src/icons/certificate.tsx
|
|
32265
32422
|
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
@@ -32421,7 +32578,7 @@ var WebRendererExperimentalBadge = () => {
|
|
|
32421
32578
|
};
|
|
32422
32579
|
|
|
32423
32580
|
// src/components/RenderModal/WebRenderModalAdvanced.tsx
|
|
32424
|
-
import { useCallback as useCallback142, useMemo as
|
|
32581
|
+
import { useCallback as useCallback142, useMemo as useMemo144 } from "react";
|
|
32425
32582
|
import { jsx as jsx275, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
32426
32583
|
var tabContainer = {
|
|
32427
32584
|
flex: 1
|
|
@@ -32433,7 +32590,9 @@ var WebRenderModalAdvanced = ({
|
|
|
32433
32590
|
mediaCacheSizeInBytes,
|
|
32434
32591
|
setMediaCacheSizeInBytes,
|
|
32435
32592
|
hardwareAcceleration,
|
|
32436
|
-
setHardwareAcceleration
|
|
32593
|
+
setHardwareAcceleration,
|
|
32594
|
+
allowHtmlInCanvas,
|
|
32595
|
+
setAllowHtmlInCanvas
|
|
32437
32596
|
}) => {
|
|
32438
32597
|
const toggleCustomMediaCacheSizeInBytes = useCallback142(() => {
|
|
32439
32598
|
setMediaCacheSizeInBytes((previous) => {
|
|
@@ -32443,6 +32602,9 @@ var WebRenderModalAdvanced = ({
|
|
|
32443
32602
|
return null;
|
|
32444
32603
|
});
|
|
32445
32604
|
}, [setMediaCacheSizeInBytes]);
|
|
32605
|
+
const toggleAllowHtmlInCanvas = useCallback142(() => {
|
|
32606
|
+
setAllowHtmlInCanvas((prev) => !prev);
|
|
32607
|
+
}, [setAllowHtmlInCanvas]);
|
|
32446
32608
|
const changeMediaCacheSizeInBytes = useCallback142((cb) => {
|
|
32447
32609
|
setMediaCacheSizeInBytes((prev) => {
|
|
32448
32610
|
if (prev === null) {
|
|
@@ -32454,7 +32616,7 @@ var WebRenderModalAdvanced = ({
|
|
|
32454
32616
|
return cb;
|
|
32455
32617
|
});
|
|
32456
32618
|
}, [setMediaCacheSizeInBytes]);
|
|
32457
|
-
const hardwareAccelerationOptions =
|
|
32619
|
+
const hardwareAccelerationOptions = useMemo144(() => {
|
|
32458
32620
|
return [
|
|
32459
32621
|
{
|
|
32460
32622
|
label: "No Preference",
|
|
@@ -32554,14 +32716,39 @@ var WebRenderModalAdvanced = ({
|
|
|
32554
32716
|
})
|
|
32555
32717
|
})
|
|
32556
32718
|
]
|
|
32557
|
-
}) : null
|
|
32719
|
+
}) : null,
|
|
32720
|
+
/* @__PURE__ */ jsxs145("div", {
|
|
32721
|
+
style: optionRow,
|
|
32722
|
+
children: [
|
|
32723
|
+
/* @__PURE__ */ jsxs145("div", {
|
|
32724
|
+
style: label5,
|
|
32725
|
+
children: [
|
|
32726
|
+
"Allow HTML-in-canvas ",
|
|
32727
|
+
/* @__PURE__ */ jsx275(Spacing, {
|
|
32728
|
+
x: 0.5
|
|
32729
|
+
}),
|
|
32730
|
+
/* @__PURE__ */ jsx275(OptionExplainerBubble, {
|
|
32731
|
+
id: "allowHtmlInCanvasOption"
|
|
32732
|
+
})
|
|
32733
|
+
]
|
|
32734
|
+
}),
|
|
32735
|
+
/* @__PURE__ */ jsx275("div", {
|
|
32736
|
+
style: rightRow,
|
|
32737
|
+
children: /* @__PURE__ */ jsx275(Checkbox, {
|
|
32738
|
+
checked: allowHtmlInCanvas,
|
|
32739
|
+
onChange: toggleAllowHtmlInCanvas,
|
|
32740
|
+
name: "allow-html-in-canvas"
|
|
32741
|
+
})
|
|
32742
|
+
})
|
|
32743
|
+
]
|
|
32744
|
+
})
|
|
32558
32745
|
]
|
|
32559
32746
|
});
|
|
32560
32747
|
};
|
|
32561
32748
|
|
|
32562
32749
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
32563
32750
|
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
32564
|
-
import { useMemo as
|
|
32751
|
+
import { useMemo as useMemo145 } from "react";
|
|
32565
32752
|
|
|
32566
32753
|
// src/components/RenderModal/quality-options.tsx
|
|
32567
32754
|
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
@@ -32634,8 +32821,8 @@ var WebRenderModalAudio = ({
|
|
|
32634
32821
|
encodableCodecs,
|
|
32635
32822
|
effectiveAudioCodec
|
|
32636
32823
|
}) => {
|
|
32637
|
-
const containerSupported =
|
|
32638
|
-
const audioCodecOptions =
|
|
32824
|
+
const containerSupported = useMemo145(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
32825
|
+
const audioCodecOptions = useMemo145(() => {
|
|
32639
32826
|
return containerSupported.map((codec) => {
|
|
32640
32827
|
const isEncodable = encodableCodecs.includes(codec);
|
|
32641
32828
|
return {
|
|
@@ -32652,7 +32839,7 @@ var WebRenderModalAudio = ({
|
|
|
32652
32839
|
};
|
|
32653
32840
|
});
|
|
32654
32841
|
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
32655
|
-
const audioBitrateOptions =
|
|
32842
|
+
const audioBitrateOptions = useMemo145(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
32656
32843
|
const isAudioOnly = renderMode === "audio";
|
|
32657
32844
|
const showAudioSettings = isAudioOnly || !muted;
|
|
32658
32845
|
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
@@ -32729,7 +32916,7 @@ var WebRenderModalAudio = ({
|
|
|
32729
32916
|
};
|
|
32730
32917
|
|
|
32731
32918
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
32732
|
-
import { useMemo as
|
|
32919
|
+
import { useMemo as useMemo146 } from "react";
|
|
32733
32920
|
import { jsx as jsx278, jsxs as jsxs147, Fragment as Fragment49 } from "react/jsx-runtime";
|
|
32734
32921
|
var tabContainer2 = {
|
|
32735
32922
|
flex: 1
|
|
@@ -32783,7 +32970,7 @@ var WebRenderModalBasic = ({
|
|
|
32783
32970
|
logLevel,
|
|
32784
32971
|
setLogLevel
|
|
32785
32972
|
}) => {
|
|
32786
|
-
const imageFormatOptions =
|
|
32973
|
+
const imageFormatOptions = useMemo146(() => {
|
|
32787
32974
|
return [
|
|
32788
32975
|
{
|
|
32789
32976
|
label: "PNG",
|
|
@@ -32805,7 +32992,7 @@ var WebRenderModalBasic = ({
|
|
|
32805
32992
|
}
|
|
32806
32993
|
];
|
|
32807
32994
|
}, [imageFormat, setStillFormat]);
|
|
32808
|
-
const logLevelOptions =
|
|
32995
|
+
const logLevelOptions = useMemo146(() => {
|
|
32809
32996
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
32810
32997
|
return {
|
|
32811
32998
|
label: humanReadableLogLevel(level),
|
|
@@ -32820,7 +33007,7 @@ var WebRenderModalBasic = ({
|
|
|
32820
33007
|
};
|
|
32821
33008
|
});
|
|
32822
33009
|
}, [logLevel, setLogLevel]);
|
|
32823
|
-
const containerOptions =
|
|
33010
|
+
const containerOptions = useMemo146(() => {
|
|
32824
33011
|
const containers = renderMode === "audio" ? audioContainers : videoContainers;
|
|
32825
33012
|
return containers.map((c) => ({
|
|
32826
33013
|
label: containerLabels[c],
|
|
@@ -32834,7 +33021,7 @@ var WebRenderModalBasic = ({
|
|
|
32834
33021
|
value: c
|
|
32835
33022
|
}));
|
|
32836
33023
|
}, [container61, setContainerFormat, renderMode]);
|
|
32837
|
-
const codecOptions =
|
|
33024
|
+
const codecOptions = useMemo146(() => {
|
|
32838
33025
|
return encodableVideoCodecs.map((c) => ({
|
|
32839
33026
|
label: codecLabels[c],
|
|
32840
33027
|
onClick: () => setCodec(c),
|
|
@@ -33424,7 +33611,7 @@ var WebRenderModalLicense = ({
|
|
|
33424
33611
|
};
|
|
33425
33612
|
|
|
33426
33613
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
33427
|
-
import { useCallback as useCallback144, useMemo as
|
|
33614
|
+
import { useCallback as useCallback144, useMemo as useMemo147 } from "react";
|
|
33428
33615
|
import { jsx as jsx282, jsxs as jsxs150, Fragment as Fragment51 } from "react/jsx-runtime";
|
|
33429
33616
|
var tabContainer4 = {
|
|
33430
33617
|
flex: 1
|
|
@@ -33442,7 +33629,7 @@ var WebRenderModalPicture = ({
|
|
|
33442
33629
|
compositionWidth,
|
|
33443
33630
|
compositionHeight
|
|
33444
33631
|
}) => {
|
|
33445
|
-
const qualityOptions =
|
|
33632
|
+
const qualityOptions = useMemo147(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
33446
33633
|
const onTransparentChanged = useCallback144((e) => {
|
|
33447
33634
|
setTransparent(e.target.checked);
|
|
33448
33635
|
}, [setTransparent]);
|
|
@@ -33571,7 +33758,8 @@ var WebRenderModal = ({
|
|
|
33571
33758
|
initialHardwareAcceleration,
|
|
33572
33759
|
initialKeyframeIntervalInSeconds,
|
|
33573
33760
|
initialTransparent,
|
|
33574
|
-
initialMuted
|
|
33761
|
+
initialMuted,
|
|
33762
|
+
initialAllowHtmlInCanvas
|
|
33575
33763
|
}) => {
|
|
33576
33764
|
const context = useContext95(ResolvedCompositionContext);
|
|
33577
33765
|
const { setSelectedModal } = useContext95(ModalsContext);
|
|
@@ -33611,27 +33799,28 @@ var WebRenderModal = ({
|
|
|
33611
33799
|
const [muted, setMuted] = useState95(initialMuted ?? false);
|
|
33612
33800
|
const [scale, setScale] = useState95(initialScale ?? 1);
|
|
33613
33801
|
const [licenseKey, setLicenseKey] = useState95(initialLicenseKey);
|
|
33802
|
+
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
|
|
33614
33803
|
const encodableAudioCodecs = useEncodableAudioCodecs(container61);
|
|
33615
33804
|
const encodableVideoCodecs = useEncodableVideoCodecs(container61);
|
|
33616
|
-
const effectiveAudioCodec =
|
|
33805
|
+
const effectiveAudioCodec = useMemo148(() => {
|
|
33617
33806
|
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
33618
33807
|
return audioCodec;
|
|
33619
33808
|
}
|
|
33620
33809
|
return encodableAudioCodecs[0] ?? audioCodec;
|
|
33621
33810
|
}, [audioCodec, encodableAudioCodecs]);
|
|
33622
|
-
const effectiveVideoCodec =
|
|
33811
|
+
const effectiveVideoCodec = useMemo148(() => {
|
|
33623
33812
|
if (encodableVideoCodecs.includes(codec)) {
|
|
33624
33813
|
return codec;
|
|
33625
33814
|
}
|
|
33626
33815
|
return encodableVideoCodecs[0] ?? codec;
|
|
33627
33816
|
}, [codec, encodableVideoCodecs]);
|
|
33628
|
-
const finalEndFrame =
|
|
33817
|
+
const finalEndFrame = useMemo148(() => {
|
|
33629
33818
|
if (endFrame === null) {
|
|
33630
33819
|
return resolvedComposition.durationInFrames - 1;
|
|
33631
33820
|
}
|
|
33632
33821
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
33633
33822
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
33634
|
-
const finalStartFrame =
|
|
33823
|
+
const finalStartFrame = useMemo148(() => {
|
|
33635
33824
|
if (startFrame === null) {
|
|
33636
33825
|
return 0;
|
|
33637
33826
|
}
|
|
@@ -33696,7 +33885,7 @@ var WebRenderModal = ({
|
|
|
33696
33885
|
setTab((prev) => prev === "audio" ? "general" : prev);
|
|
33697
33886
|
}
|
|
33698
33887
|
}, [container61, imageFormat, updateOutNameExtension]);
|
|
33699
|
-
const renderTabOptions =
|
|
33888
|
+
const renderTabOptions = useMemo148(() => {
|
|
33700
33889
|
const options = [
|
|
33701
33890
|
{
|
|
33702
33891
|
label: "Still",
|
|
@@ -33742,7 +33931,7 @@ var WebRenderModal = ({
|
|
|
33742
33931
|
const onOutNameChange = useCallback145((e) => {
|
|
33743
33932
|
setOutName(e.target.value);
|
|
33744
33933
|
}, []);
|
|
33745
|
-
const outnameValidation =
|
|
33934
|
+
const outnameValidation = useMemo148(() => {
|
|
33746
33935
|
if (renderMode === "still") {
|
|
33747
33936
|
return validateOutnameForStill({
|
|
33748
33937
|
outName,
|
|
@@ -33803,7 +33992,8 @@ var WebRenderModal = ({
|
|
|
33803
33992
|
mediaCacheSizeInBytes,
|
|
33804
33993
|
logLevel,
|
|
33805
33994
|
licenseKey,
|
|
33806
|
-
scale
|
|
33995
|
+
scale,
|
|
33996
|
+
allowHtmlInCanvas
|
|
33807
33997
|
}, compositionRef);
|
|
33808
33998
|
} else {
|
|
33809
33999
|
addClientVideoJob({
|
|
@@ -33826,7 +34016,8 @@ var WebRenderModal = ({
|
|
|
33826
34016
|
mediaCacheSizeInBytes,
|
|
33827
34017
|
logLevel,
|
|
33828
34018
|
licenseKey,
|
|
33829
|
-
scale
|
|
34019
|
+
scale,
|
|
34020
|
+
allowHtmlInCanvas
|
|
33830
34021
|
}, compositionRef);
|
|
33831
34022
|
}
|
|
33832
34023
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
@@ -33866,7 +34057,8 @@ var WebRenderModal = ({
|
|
|
33866
34057
|
setSelectedModal,
|
|
33867
34058
|
addClientStillJob,
|
|
33868
34059
|
addClientVideoJob,
|
|
33869
|
-
scale
|
|
34060
|
+
scale,
|
|
34061
|
+
allowHtmlInCanvas
|
|
33870
34062
|
]);
|
|
33871
34063
|
return /* @__PURE__ */ jsxs151("div", {
|
|
33872
34064
|
style: outerModalStyle,
|
|
@@ -34061,7 +34253,9 @@ var WebRenderModal = ({
|
|
|
34061
34253
|
mediaCacheSizeInBytes,
|
|
34062
34254
|
setMediaCacheSizeInBytes,
|
|
34063
34255
|
hardwareAcceleration,
|
|
34064
|
-
setHardwareAcceleration
|
|
34256
|
+
setHardwareAcceleration,
|
|
34257
|
+
allowHtmlInCanvas,
|
|
34258
|
+
setAllowHtmlInCanvas
|
|
34065
34259
|
}) : /* @__PURE__ */ jsx283(WebRenderModalLicense, {
|
|
34066
34260
|
licenseKey,
|
|
34067
34261
|
setLicenseKey,
|
|
@@ -34085,7 +34279,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
34085
34279
|
};
|
|
34086
34280
|
|
|
34087
34281
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
34088
|
-
import { useCallback as useCallback148, useMemo as
|
|
34282
|
+
import { useCallback as useCallback148, useMemo as useMemo150 } from "react";
|
|
34089
34283
|
|
|
34090
34284
|
// src/components/CopyButton.tsx
|
|
34091
34285
|
import { useCallback as useCallback146, useEffect as useEffect87, useState as useState96 } from "react";
|
|
@@ -34151,7 +34345,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
|
|
|
34151
34345
|
};
|
|
34152
34346
|
|
|
34153
34347
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
34154
|
-
import { useCallback as useCallback147, useMemo as
|
|
34348
|
+
import { useCallback as useCallback147, useMemo as useMemo149, useState as useState97 } from "react";
|
|
34155
34349
|
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
34156
34350
|
var svgStyle2 = {
|
|
34157
34351
|
width: "11px",
|
|
@@ -34171,7 +34365,7 @@ var OpenIssueButton = ({ link: link4 }) => {
|
|
|
34171
34365
|
const handleClick = useCallback147(() => {
|
|
34172
34366
|
window.open(link4, "_blank");
|
|
34173
34367
|
}, [link4]);
|
|
34174
|
-
const svgFillColor =
|
|
34368
|
+
const svgFillColor = useMemo149(() => {
|
|
34175
34369
|
return hovered ? "white" : LIGHT_TEXT;
|
|
34176
34370
|
}, [hovered]);
|
|
34177
34371
|
const openInEditorSvg = /* @__PURE__ */ jsx285("svg", {
|
|
@@ -34268,7 +34462,7 @@ var commands = {
|
|
|
34268
34462
|
unknown: "npx remotion upgrade"
|
|
34269
34463
|
};
|
|
34270
34464
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
34271
|
-
const hasKnownBugs =
|
|
34465
|
+
const hasKnownBugs = useMemo150(() => {
|
|
34272
34466
|
return knownBugs && knownBugs?.length > 0;
|
|
34273
34467
|
}, [knownBugs]);
|
|
34274
34468
|
const command = commands[info.packageManager];
|
|
@@ -34432,6 +34626,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
34432
34626
|
renderTypeOfLastRender: modalContextType.renderTypeOfLastRender,
|
|
34433
34627
|
defaultMetadata: modalContextType.defaulMetadata,
|
|
34434
34628
|
initialHardwareAcceleration: modalContextType.initialHardwareAcceleration,
|
|
34629
|
+
initialSampleRate: modalContextType.initialSampleRate,
|
|
34435
34630
|
initialChromeMode: modalContextType.initialChromeMode,
|
|
34436
34631
|
renderDefaults: modalContextType.renderDefaults
|
|
34437
34632
|
}) : null,
|
|
@@ -34476,7 +34671,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
34476
34671
|
const onMounted = useCallback149(() => {
|
|
34477
34672
|
setCanvasMounted(true);
|
|
34478
34673
|
}, []);
|
|
34479
|
-
const value =
|
|
34674
|
+
const value = useMemo151(() => {
|
|
34480
34675
|
if (!size4) {
|
|
34481
34676
|
return null;
|
|
34482
34677
|
}
|
|
@@ -34485,15 +34680,15 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
34485
34680
|
canvasSize: size4
|
|
34486
34681
|
};
|
|
34487
34682
|
}, [size4]);
|
|
34488
|
-
const MemoRoot =
|
|
34683
|
+
const MemoRoot = useMemo151(() => {
|
|
34489
34684
|
return React187.memo(Root);
|
|
34490
34685
|
}, [Root]);
|
|
34491
34686
|
const [renderError, setRenderError] = useState98(null);
|
|
34492
34687
|
const clearError = useCallback149(() => {
|
|
34493
34688
|
setRenderError(null);
|
|
34494
34689
|
}, []);
|
|
34495
|
-
const compositionRenderErrorContextValue =
|
|
34496
|
-
const renderErrorContextValue =
|
|
34690
|
+
const compositionRenderErrorContextValue = useMemo151(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
34691
|
+
const renderErrorContextValue = useMemo151(() => ({ error: renderError }), [renderError]);
|
|
34497
34692
|
return /* @__PURE__ */ jsx289(HigherZIndex, {
|
|
34498
34693
|
onEscape: noop,
|
|
34499
34694
|
onOutsideClick: noop,
|
|
@@ -34544,7 +34739,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
34544
34739
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
34545
34740
|
|
|
34546
34741
|
// src/state/preview-size.tsx
|
|
34547
|
-
import { useCallback as useCallback150, useContext as useContext97, useMemo as
|
|
34742
|
+
import { useCallback as useCallback150, useContext as useContext97, useMemo as useMemo152, useState as useState99 } from "react";
|
|
34548
34743
|
import { Internals as Internals66 } from "remotion";
|
|
34549
34744
|
import { jsx as jsx290 } from "react/jsx-runtime";
|
|
34550
34745
|
var key5 = "remotion.previewSize";
|
|
@@ -34580,7 +34775,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
34580
34775
|
return newVal;
|
|
34581
34776
|
});
|
|
34582
34777
|
}, []);
|
|
34583
|
-
const previewSizeCtx =
|
|
34778
|
+
const previewSizeCtx = useMemo152(() => {
|
|
34584
34779
|
return {
|
|
34585
34780
|
size: editorZoomGestures ? size4 : {
|
|
34586
34781
|
size: size4.size,
|
|
@@ -34601,7 +34796,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
34601
34796
|
};
|
|
34602
34797
|
|
|
34603
34798
|
// src/components/CheckerboardProvider.tsx
|
|
34604
|
-
import { useCallback as useCallback151, useMemo as
|
|
34799
|
+
import { useCallback as useCallback151, useMemo as useMemo153, useState as useState100 } from "react";
|
|
34605
34800
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
34606
34801
|
var CheckerboardProvider = ({ children }) => {
|
|
34607
34802
|
const [checkerboard, setCheckerboardState] = useState100(() => loadCheckerboardOption());
|
|
@@ -34612,7 +34807,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
34612
34807
|
return newVal;
|
|
34613
34808
|
});
|
|
34614
34809
|
}, []);
|
|
34615
|
-
const checkerboardCtx =
|
|
34810
|
+
const checkerboardCtx = useMemo153(() => {
|
|
34616
34811
|
return {
|
|
34617
34812
|
checkerboard,
|
|
34618
34813
|
setCheckerboard
|
|
@@ -34625,19 +34820,19 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
34625
34820
|
};
|
|
34626
34821
|
|
|
34627
34822
|
// src/components/MediaVolumeProvider.tsx
|
|
34628
|
-
import { useMemo as
|
|
34823
|
+
import { useMemo as useMemo154, useState as useState101 } from "react";
|
|
34629
34824
|
import { Internals as Internals67 } from "remotion";
|
|
34630
34825
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
34631
34826
|
var MediaVolumeProvider = ({ children }) => {
|
|
34632
34827
|
const [mediaMuted, setMediaMuted] = useState101(() => loadMuteOption());
|
|
34633
34828
|
const [mediaVolume, setMediaVolume] = useState101(1);
|
|
34634
|
-
const mediaVolumeContextValue =
|
|
34829
|
+
const mediaVolumeContextValue = useMemo154(() => {
|
|
34635
34830
|
return {
|
|
34636
34831
|
mediaMuted,
|
|
34637
34832
|
mediaVolume
|
|
34638
34833
|
};
|
|
34639
34834
|
}, [mediaMuted, mediaVolume]);
|
|
34640
|
-
const setMediaVolumeContextValue =
|
|
34835
|
+
const setMediaVolumeContextValue = useMemo154(() => {
|
|
34641
34836
|
return {
|
|
34642
34837
|
setMediaMuted,
|
|
34643
34838
|
setMediaVolume
|
|
@@ -34653,11 +34848,11 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
34653
34848
|
};
|
|
34654
34849
|
|
|
34655
34850
|
// src/components/ModalsProvider.tsx
|
|
34656
|
-
import { useMemo as
|
|
34851
|
+
import { useMemo as useMemo155, useState as useState102 } from "react";
|
|
34657
34852
|
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
34658
34853
|
var ModalsProvider = ({ children }) => {
|
|
34659
34854
|
const [modalContextType, setModalContextType] = useState102(null);
|
|
34660
|
-
const modalsContext =
|
|
34855
|
+
const modalsContext = useMemo155(() => {
|
|
34661
34856
|
return {
|
|
34662
34857
|
selectedModal: modalContextType,
|
|
34663
34858
|
setSelectedModal: setModalContextType
|
|
@@ -34670,7 +34865,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
34670
34865
|
};
|
|
34671
34866
|
|
|
34672
34867
|
// src/components/SetTimelineInOutProvider.tsx
|
|
34673
|
-
import { useEffect as useEffect88, useMemo as
|
|
34868
|
+
import { useEffect as useEffect88, useMemo as useMemo156, useState as useState103 } from "react";
|
|
34674
34869
|
|
|
34675
34870
|
// src/state/marks.ts
|
|
34676
34871
|
var localStorageKey5 = () => `remotion.editor.marksv2`;
|
|
@@ -34689,7 +34884,7 @@ var loadMarks = () => {
|
|
|
34689
34884
|
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
34690
34885
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
34691
34886
|
const [inAndOutFrames, setInAndOutFrames] = useState103(() => loadMarks());
|
|
34692
|
-
const setTimelineInOutContextValue =
|
|
34887
|
+
const setTimelineInOutContextValue = useMemo156(() => {
|
|
34693
34888
|
return {
|
|
34694
34889
|
setInAndOutFrames
|
|
34695
34890
|
};
|
|
@@ -34707,7 +34902,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
34707
34902
|
};
|
|
34708
34903
|
|
|
34709
34904
|
// src/components/ShowGuidesProvider.tsx
|
|
34710
|
-
import { useCallback as useCallback152, useMemo as
|
|
34905
|
+
import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState104 } from "react";
|
|
34711
34906
|
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
34712
34907
|
var ShowGuidesProvider = ({ children }) => {
|
|
34713
34908
|
const [guidesList, setGuidesList] = useState104(() => loadGuidesList());
|
|
@@ -34723,7 +34918,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
34723
34918
|
return newVal;
|
|
34724
34919
|
});
|
|
34725
34920
|
}, []);
|
|
34726
|
-
const editorShowGuidesCtx =
|
|
34921
|
+
const editorShowGuidesCtx = useMemo157(() => {
|
|
34727
34922
|
return {
|
|
34728
34923
|
editorShowGuides,
|
|
34729
34924
|
setEditorShowGuides,
|
|
@@ -34750,7 +34945,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
34750
34945
|
};
|
|
34751
34946
|
|
|
34752
34947
|
// src/components/ShowRulersProvider.tsx
|
|
34753
|
-
import { useCallback as useCallback153, useMemo as
|
|
34948
|
+
import { useCallback as useCallback153, useMemo as useMemo158, useState as useState105 } from "react";
|
|
34754
34949
|
import { jsx as jsx296 } from "react/jsx-runtime";
|
|
34755
34950
|
var ShowRulersProvider = ({ children }) => {
|
|
34756
34951
|
const [editorShowRulers, setEditorShowRulersState] = useState105(() => loadEditorShowRulersOption());
|
|
@@ -34761,7 +34956,7 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
34761
34956
|
return newVal;
|
|
34762
34957
|
});
|
|
34763
34958
|
}, []);
|
|
34764
|
-
const editorShowRulersCtx =
|
|
34959
|
+
const editorShowRulersCtx = useMemo158(() => {
|
|
34765
34960
|
return {
|
|
34766
34961
|
editorShowRulers,
|
|
34767
34962
|
setEditorShowRulers
|
|
@@ -34793,7 +34988,7 @@ var VisualControlsUndoSync = () => {
|
|
|
34793
34988
|
};
|
|
34794
34989
|
|
|
34795
34990
|
// src/components/ZoomGesturesProvider.tsx
|
|
34796
|
-
import { useCallback as useCallback154, useMemo as
|
|
34991
|
+
import { useCallback as useCallback154, useMemo as useMemo159, useState as useState106 } from "react";
|
|
34797
34992
|
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
34798
34993
|
var ZoomGesturesProvider = ({ children }) => {
|
|
34799
34994
|
const [editorZoomGestures, setEditorZoomGesturesState] = useState106(() => loadEditorZoomGesturesOption());
|
|
@@ -34804,7 +34999,7 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
34804
34999
|
return newVal;
|
|
34805
35000
|
});
|
|
34806
35001
|
}, []);
|
|
34807
|
-
const editorZoomGesturesCtx =
|
|
35002
|
+
const editorZoomGesturesCtx = useMemo159(() => {
|
|
34808
35003
|
return {
|
|
34809
35004
|
editorZoomGestures,
|
|
34810
35005
|
setEditorZoomGestures
|
|
@@ -34941,7 +35136,7 @@ var ServerDisconnected = () => {
|
|
|
34941
35136
|
};
|
|
34942
35137
|
|
|
34943
35138
|
// src/FastRefreshProvider.tsx
|
|
34944
|
-
import { useCallback as useCallback155, useEffect as useEffect90, useMemo as
|
|
35139
|
+
import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState107 } from "react";
|
|
34945
35140
|
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
34946
35141
|
var FastRefreshProvider = ({ children }) => {
|
|
34947
35142
|
const [fastRefreshes, setFastRefreshes] = useState107(0);
|
|
@@ -34960,7 +35155,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
34960
35155
|
}
|
|
34961
35156
|
}
|
|
34962
35157
|
}, []);
|
|
34963
|
-
const value =
|
|
35158
|
+
const value = useMemo160(() => ({ fastRefreshes, manualRefreshes, increaseManualRefreshes }), [fastRefreshes, manualRefreshes, increaseManualRefreshes]);
|
|
34964
35159
|
return /* @__PURE__ */ jsx300(FastRefreshContext.Provider, {
|
|
34965
35160
|
value,
|
|
34966
35161
|
children
|
|
@@ -35135,7 +35330,7 @@ import {
|
|
|
35135
35330
|
useContext as useContext100,
|
|
35136
35331
|
useEffect as useEffect91,
|
|
35137
35332
|
useImperativeHandle as useImperativeHandle14,
|
|
35138
|
-
useMemo as
|
|
35333
|
+
useMemo as useMemo161,
|
|
35139
35334
|
useState as useState108
|
|
35140
35335
|
} from "react";
|
|
35141
35336
|
import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
|
|
@@ -35145,20 +35340,20 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35145
35340
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
|
|
35146
35341
|
const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
|
|
35147
35342
|
if (manualRefreshes) {}
|
|
35148
|
-
const selectedComposition =
|
|
35343
|
+
const selectedComposition = useMemo161(() => {
|
|
35149
35344
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
35150
35345
|
}, [canvasContent, compositions]);
|
|
35151
35346
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
35152
35347
|
const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
|
|
35153
35348
|
const env = Internals69.getRemotionEnvironment();
|
|
35154
|
-
const inputProps =
|
|
35349
|
+
const inputProps = useMemo161(() => {
|
|
35155
35350
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
35156
35351
|
}, [env.isPlayer]);
|
|
35157
35352
|
const [resolvedConfigs, setResolvedConfigs] = useState108({});
|
|
35158
|
-
const selectedEditorProps =
|
|
35353
|
+
const selectedEditorProps = useMemo161(() => {
|
|
35159
35354
|
return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
|
|
35160
35355
|
}, [allEditorProps, selectedComposition]);
|
|
35161
|
-
const renderModalProps =
|
|
35356
|
+
const renderModalProps = useMemo161(() => {
|
|
35162
35357
|
return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};
|
|
35163
35358
|
}, [allEditorProps, renderModalComposition]);
|
|
35164
35359
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -35295,13 +35490,13 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35295
35490
|
inputProps
|
|
35296
35491
|
]);
|
|
35297
35492
|
const isTheSame = selectedComposition?.id === renderModalComposition?.id;
|
|
35298
|
-
const currentDefaultProps =
|
|
35493
|
+
const currentDefaultProps = useMemo161(() => {
|
|
35299
35494
|
return {
|
|
35300
35495
|
...selectedComposition?.defaultProps ?? {},
|
|
35301
35496
|
...selectedEditorProps ?? {}
|
|
35302
35497
|
};
|
|
35303
35498
|
}, [selectedComposition?.defaultProps, selectedEditorProps]);
|
|
35304
|
-
const originalProps =
|
|
35499
|
+
const originalProps = useMemo161(() => {
|
|
35305
35500
|
return {
|
|
35306
35501
|
...currentDefaultProps,
|
|
35307
35502
|
...inputProps ?? {}
|
|
@@ -35370,7 +35565,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35370
35565
|
renderModalComposition,
|
|
35371
35566
|
renderModalProps
|
|
35372
35567
|
]);
|
|
35373
|
-
const resolvedConfigsIncludingStaticOnes =
|
|
35568
|
+
const resolvedConfigsIncludingStaticOnes = useMemo161(() => {
|
|
35374
35569
|
const staticComps = compositions.filter((c) => {
|
|
35375
35570
|
return c.calculateMetadata === null;
|
|
35376
35571
|
});
|