@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
|
@@ -2420,7 +2420,7 @@ var getErrorRecord = async (error) => {
|
|
|
2420
2420
|
};
|
|
2421
2421
|
};
|
|
2422
2422
|
var crashWithFrames = (crash) => (error) => {
|
|
2423
|
-
const didHookOrderChange = error.message.startsWith("Rendered fewer hooks") || error.message.startsWith("Rendered more hooks");
|
|
2423
|
+
const didHookOrderChange = error.message.startsWith("Rendered fewer hooks") || error.message.startsWith("Rendered more hooks") || error.message.startsWith("Should have a queue");
|
|
2424
2424
|
const key = "remotion.lastCrashBecauseOfHooks";
|
|
2425
2425
|
const previousCrashWasBecauseOfHooks = window.localStorage.getItem(key);
|
|
2426
2426
|
const justRefreshedBecauseOfHooks = previousCrashWasBecauseOfHooks ? Date.now() - Number(previousCrashWasBecauseOfHooks) < 5000 : false;
|
|
@@ -2740,7 +2740,7 @@ import { Internals as Internals70 } from "remotion";
|
|
|
2740
2740
|
|
|
2741
2741
|
// src/components/Editor.tsx
|
|
2742
2742
|
import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
|
|
2743
|
-
import React189, { useCallback as useCallback150, useMemo as
|
|
2743
|
+
import React189, { useCallback as useCallback150, useMemo as useMemo151, useState as useState100 } from "react";
|
|
2744
2744
|
import { Internals as Internals65 } from "remotion";
|
|
2745
2745
|
|
|
2746
2746
|
// src/helpers/noop.ts
|
|
@@ -4689,6 +4689,34 @@ var MenuSubItem = ({
|
|
|
4689
4689
|
});
|
|
4690
4690
|
};
|
|
4691
4691
|
|
|
4692
|
+
// src/components/NewComposition/menu-typeahead.ts
|
|
4693
|
+
var getLabelToMatch = (value) => {
|
|
4694
|
+
if (value.type === "divider" || value.disabled) {
|
|
4695
|
+
return null;
|
|
4696
|
+
}
|
|
4697
|
+
if (typeof value.label === "string") {
|
|
4698
|
+
return value.label;
|
|
4699
|
+
}
|
|
4700
|
+
return null;
|
|
4701
|
+
};
|
|
4702
|
+
var findTypeaheadMenuItem = ({
|
|
4703
|
+
query,
|
|
4704
|
+
values
|
|
4705
|
+
}) => {
|
|
4706
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
4707
|
+
if (normalizedQuery.length === 0) {
|
|
4708
|
+
return null;
|
|
4709
|
+
}
|
|
4710
|
+
const matched = values.find((value) => {
|
|
4711
|
+
const label2 = getLabelToMatch(value);
|
|
4712
|
+
return label2 ? label2.toLowerCase().startsWith(normalizedQuery) : false;
|
|
4713
|
+
});
|
|
4714
|
+
if (!matched || matched.type === "divider") {
|
|
4715
|
+
return null;
|
|
4716
|
+
}
|
|
4717
|
+
return matched.id;
|
|
4718
|
+
};
|
|
4719
|
+
|
|
4692
4720
|
// src/components/NewComposition/MenuContent.tsx
|
|
4693
4721
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
4694
4722
|
var BORDER_SIZE = 1;
|
|
@@ -4716,6 +4744,8 @@ var MenuContent = ({
|
|
|
4716
4744
|
const containerRef = useRef10(null);
|
|
4717
4745
|
const isMobileLayout = useMobileLayout();
|
|
4718
4746
|
const [subMenuActivated, setSubMenuActivated] = useState19(false);
|
|
4747
|
+
const typeaheadQueryRef = useRef10("");
|
|
4748
|
+
const typeaheadTimeoutRef = useRef10(null);
|
|
4719
4749
|
if (values[0].type === "divider") {
|
|
4720
4750
|
throw new Error("first value cant be divide");
|
|
4721
4751
|
}
|
|
@@ -4726,6 +4756,13 @@ var MenuContent = ({
|
|
|
4726
4756
|
const onItemSelected = useCallback20((id) => {
|
|
4727
4757
|
setSelectedItem(id);
|
|
4728
4758
|
}, []);
|
|
4759
|
+
const clearTypeahead = useCallback20(() => {
|
|
4760
|
+
typeaheadQueryRef.current = "";
|
|
4761
|
+
if (typeaheadTimeoutRef.current !== null) {
|
|
4762
|
+
window.clearTimeout(typeaheadTimeoutRef.current);
|
|
4763
|
+
typeaheadTimeoutRef.current = null;
|
|
4764
|
+
}
|
|
4765
|
+
}, []);
|
|
4729
4766
|
const isItemSelectable = useCallback20((v) => {
|
|
4730
4767
|
return v.type !== "divider" && !v.disabled;
|
|
4731
4768
|
}, []);
|
|
@@ -4799,6 +4836,30 @@ var MenuContent = ({
|
|
|
4799
4836
|
}
|
|
4800
4837
|
setSubMenuActivated("without-mouse");
|
|
4801
4838
|
}, [onNextMenu, selectedItem, values]);
|
|
4839
|
+
const onTypeahead = useCallback20((event) => {
|
|
4840
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.key.length !== 1 || event.key.trim().length === 0) {
|
|
4841
|
+
return;
|
|
4842
|
+
}
|
|
4843
|
+
const { activeElement } = document;
|
|
4844
|
+
if (activeElement instanceof HTMLInputElement || activeElement instanceof HTMLTextAreaElement) {
|
|
4845
|
+
return;
|
|
4846
|
+
}
|
|
4847
|
+
typeaheadQueryRef.current = `${typeaheadQueryRef.current}${event.key}`;
|
|
4848
|
+
const matchedId = findTypeaheadMenuItem({
|
|
4849
|
+
query: typeaheadQueryRef.current,
|
|
4850
|
+
values
|
|
4851
|
+
});
|
|
4852
|
+
if (matchedId !== null) {
|
|
4853
|
+
setSelectedItem(matchedId);
|
|
4854
|
+
}
|
|
4855
|
+
if (typeaheadTimeoutRef.current !== null) {
|
|
4856
|
+
window.clearTimeout(typeaheadTimeoutRef.current);
|
|
4857
|
+
}
|
|
4858
|
+
typeaheadTimeoutRef.current = window.setTimeout(() => {
|
|
4859
|
+
typeaheadQueryRef.current = "";
|
|
4860
|
+
typeaheadTimeoutRef.current = null;
|
|
4861
|
+
}, 700);
|
|
4862
|
+
}, [values]);
|
|
4802
4863
|
const containerWithHeight = useMemo20(() => {
|
|
4803
4864
|
const containerStyles = { ...container11 };
|
|
4804
4865
|
if (fixedHeight === null) {
|
|
@@ -4811,6 +4872,24 @@ var MenuContent = ({
|
|
|
4811
4872
|
}
|
|
4812
4873
|
return containerStyles;
|
|
4813
4874
|
}, [fixedHeight, isMobileLayout]);
|
|
4875
|
+
useEffect18(() => {
|
|
4876
|
+
if (!keybindings.isHighestContext || !process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
4877
|
+
return;
|
|
4878
|
+
}
|
|
4879
|
+
const onKeyDown = (event) => {
|
|
4880
|
+
onTypeahead(event);
|
|
4881
|
+
};
|
|
4882
|
+
window.addEventListener("keydown", onKeyDown);
|
|
4883
|
+
return () => {
|
|
4884
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
4885
|
+
clearTypeahead();
|
|
4886
|
+
};
|
|
4887
|
+
}, [clearTypeahead, keybindings.isHighestContext, onTypeahead]);
|
|
4888
|
+
useEffect18(() => {
|
|
4889
|
+
return () => {
|
|
4890
|
+
clearTypeahead();
|
|
4891
|
+
};
|
|
4892
|
+
}, [clearTypeahead]);
|
|
4814
4893
|
useEffect18(() => {
|
|
4815
4894
|
const escapeBinding = keybindings.registerKeybinding({
|
|
4816
4895
|
event: "keydown",
|
|
@@ -5282,6 +5361,7 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
5282
5361
|
renderTypeOfLastRender: null,
|
|
5283
5362
|
defaulMetadata: defaults.metadata,
|
|
5284
5363
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
5364
|
+
initialSampleRate: defaults.sampleRate,
|
|
5285
5365
|
initialChromeMode: defaults.chromeMode,
|
|
5286
5366
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
5287
5367
|
renderDefaults: defaults,
|
|
@@ -6105,7 +6185,8 @@ var addVideoRenderJob = ({
|
|
|
6105
6185
|
metadata,
|
|
6106
6186
|
hardwareAcceleration,
|
|
6107
6187
|
chromeMode,
|
|
6108
|
-
mediaCacheSizeInBytes
|
|
6188
|
+
mediaCacheSizeInBytes,
|
|
6189
|
+
sampleRate
|
|
6109
6190
|
}) => {
|
|
6110
6191
|
return callApi("/api/render", {
|
|
6111
6192
|
compositionId,
|
|
@@ -6152,7 +6233,8 @@ var addVideoRenderJob = ({
|
|
|
6152
6233
|
metadata,
|
|
6153
6234
|
hardwareAcceleration,
|
|
6154
6235
|
chromeMode,
|
|
6155
|
-
mediaCacheSizeInBytes
|
|
6236
|
+
mediaCacheSizeInBytes,
|
|
6237
|
+
sampleRate
|
|
6156
6238
|
});
|
|
6157
6239
|
};
|
|
6158
6240
|
var unsubscribeFromFileExistenceWatcher = ({
|
|
@@ -16825,7 +16907,7 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16825
16907
|
if (!compositionRef) {
|
|
16826
16908
|
throw new Error(`Composition not found for job ${job.id}`);
|
|
16827
16909
|
}
|
|
16828
|
-
const
|
|
16910
|
+
const blob = await (await renderStillOnWeb({
|
|
16829
16911
|
composition: {
|
|
16830
16912
|
component: compositionRef.component,
|
|
16831
16913
|
width: compositionRef.width,
|
|
@@ -16837,15 +16919,15 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16837
16919
|
id: job.compositionId
|
|
16838
16920
|
},
|
|
16839
16921
|
frame: job.frame,
|
|
16840
|
-
imageFormat: job.imageFormat,
|
|
16841
16922
|
inputProps: job.inputProps,
|
|
16842
16923
|
delayRenderTimeoutInMilliseconds: job.delayRenderTimeout,
|
|
16843
16924
|
mediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16844
16925
|
logLevel: job.logLevel,
|
|
16845
16926
|
licenseKey: job.licenseKey ?? undefined,
|
|
16846
16927
|
scale: job.scale,
|
|
16847
|
-
signal
|
|
16848
|
-
|
|
16928
|
+
signal,
|
|
16929
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16930
|
+
})).blob({ format: job.imageFormat });
|
|
16849
16931
|
return {
|
|
16850
16932
|
getBlob: () => Promise.resolve(blob),
|
|
16851
16933
|
width: compositionRef.width,
|
|
@@ -16895,7 +16977,8 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16895
16977
|
});
|
|
16896
16978
|
},
|
|
16897
16979
|
outputTarget: "web-fs",
|
|
16898
|
-
licenseKey: job.licenseKey ?? undefined
|
|
16980
|
+
licenseKey: job.licenseKey ?? undefined,
|
|
16981
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas
|
|
16899
16982
|
});
|
|
16900
16983
|
return {
|
|
16901
16984
|
getBlob,
|
|
@@ -17436,6 +17519,7 @@ var makeRetryPayload = (job) => {
|
|
|
17436
17519
|
defaulMetadata: job.metadata,
|
|
17437
17520
|
renderTypeOfLastRender: "still",
|
|
17438
17521
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
17522
|
+
initialSampleRate: defaults.sampleRate,
|
|
17439
17523
|
initialChromeMode: job.chromeMode,
|
|
17440
17524
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
17441
17525
|
renderDefaults: defaults,
|
|
@@ -17489,6 +17573,7 @@ var makeRetryPayload = (job) => {
|
|
|
17489
17573
|
defaulMetadata: job.metadata,
|
|
17490
17574
|
renderTypeOfLastRender: "sequence",
|
|
17491
17575
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
17576
|
+
initialSampleRate: defaults.sampleRate,
|
|
17492
17577
|
initialChromeMode: job.chromeMode,
|
|
17493
17578
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
17494
17579
|
renderDefaults: defaults,
|
|
@@ -17542,6 +17627,7 @@ var makeRetryPayload = (job) => {
|
|
|
17542
17627
|
defaulMetadata: job.metadata,
|
|
17543
17628
|
renderTypeOfLastRender: "video",
|
|
17544
17629
|
initialHardwareAcceleration: job.hardwareAcceleration,
|
|
17630
|
+
initialSampleRate: job.sampleRate,
|
|
17545
17631
|
initialChromeMode: job.chromeMode,
|
|
17546
17632
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
17547
17633
|
renderDefaults: defaults,
|
|
@@ -17573,7 +17659,8 @@ var makeClientRetryPayload = (job) => {
|
|
|
17573
17659
|
initialStillImageFormat: job.type === "client-still" ? job.imageFormat : "png",
|
|
17574
17660
|
initialKeyframeIntervalInSeconds: job.type === "client-video" ? job.keyframeIntervalInSeconds : null,
|
|
17575
17661
|
initialMuted: job.type === "client-video" ? job.muted : null,
|
|
17576
|
-
initialTransparent: job.type === "client-video" ? job.transparent : null
|
|
17662
|
+
initialTransparent: job.type === "client-video" ? job.transparent : null,
|
|
17663
|
+
initialAllowHtmlInCanvas: job.allowHtmlInCanvas
|
|
17577
17664
|
};
|
|
17578
17665
|
};
|
|
17579
17666
|
|
|
@@ -19396,6 +19483,7 @@ var RenderButton = ({
|
|
|
19396
19483
|
renderTypeOfLastRender: null,
|
|
19397
19484
|
defaulMetadata: defaults.metadata,
|
|
19398
19485
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
19486
|
+
initialSampleRate: defaults.sampleRate,
|
|
19399
19487
|
initialChromeMode: defaults.chromeMode,
|
|
19400
19488
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
19401
19489
|
renderDefaults: defaults
|
|
@@ -19431,7 +19519,8 @@ var RenderButton = ({
|
|
|
19431
19519
|
initialKeyframeIntervalInSeconds: null,
|
|
19432
19520
|
initialTransparent: null,
|
|
19433
19521
|
initialMuted: null,
|
|
19434
|
-
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
|
|
19522
|
+
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
19523
|
+
initialAllowHtmlInCanvas: defaults.allowHtmlInCanvas
|
|
19435
19524
|
});
|
|
19436
19525
|
}, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
|
|
19437
19526
|
const onClick = useCallback94(() => {
|
|
@@ -28354,7 +28443,7 @@ import {
|
|
|
28354
28443
|
useCallback as useCallback142,
|
|
28355
28444
|
useContext as useContext94,
|
|
28356
28445
|
useEffect as useEffect84,
|
|
28357
|
-
useMemo as
|
|
28446
|
+
useMemo as useMemo143,
|
|
28358
28447
|
useReducer as useReducer2,
|
|
28359
28448
|
useRef as useRef49,
|
|
28360
28449
|
useState as useState93
|
|
@@ -28504,6 +28593,7 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
28504
28593
|
beepOnFinish,
|
|
28505
28594
|
repro,
|
|
28506
28595
|
metadata,
|
|
28596
|
+
sampleRate,
|
|
28507
28597
|
envVariables,
|
|
28508
28598
|
inputProps
|
|
28509
28599
|
}) => {
|
|
@@ -28591,6 +28681,9 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
28591
28681
|
if (audioCodec !== defaultAudioCodec) {
|
|
28592
28682
|
addFlagWithValue(flags, getRenderMediaFlag("audioCodec"), audioCodec);
|
|
28593
28683
|
}
|
|
28684
|
+
addValueFlagsIfChanged(flags, [
|
|
28685
|
+
renderMediaValueFlag("sampleRate", sampleRate, renderDefaults.sampleRate)
|
|
28686
|
+
]);
|
|
28594
28687
|
}
|
|
28595
28688
|
addTrueBooleanFlagsIfChanged(flags, [
|
|
28596
28689
|
renderMediaBooleanFlag("disallowParallelEncoding", disallowParallelEncoding, false),
|
|
@@ -28864,8 +28957,9 @@ var padding3 = {
|
|
|
28864
28957
|
var title6 = {
|
|
28865
28958
|
fontSize: 14
|
|
28866
28959
|
};
|
|
28960
|
+
var DESCRIPTION_FONT_SIZE_PX = 14;
|
|
28867
28961
|
var description = {
|
|
28868
|
-
fontSize:
|
|
28962
|
+
fontSize: DESCRIPTION_FONT_SIZE_PX,
|
|
28869
28963
|
maxWidth: 400
|
|
28870
28964
|
};
|
|
28871
28965
|
var link3 = {
|
|
@@ -28924,9 +29018,22 @@ var OptionExplainer = ({ option }) => {
|
|
|
28924
29018
|
}) : null
|
|
28925
29019
|
]
|
|
28926
29020
|
}),
|
|
28927
|
-
/* @__PURE__ */
|
|
29021
|
+
/* @__PURE__ */ jsxs127("div", {
|
|
28928
29022
|
style: description,
|
|
28929
|
-
children:
|
|
29023
|
+
children: [
|
|
29024
|
+
/* @__PURE__ */ jsx253("style", {
|
|
29025
|
+
children: `
|
|
29026
|
+
.__remotion-option-explainer-description a,
|
|
29027
|
+
.__remotion-option-explainer-description code {
|
|
29028
|
+
font-size: ${DESCRIPTION_FONT_SIZE_PX}px;
|
|
29029
|
+
}
|
|
29030
|
+
`
|
|
29031
|
+
}),
|
|
29032
|
+
/* @__PURE__ */ jsx253("div", {
|
|
29033
|
+
className: "__remotion-option-explainer-description",
|
|
29034
|
+
children: option.description("ssr")
|
|
29035
|
+
})
|
|
29036
|
+
]
|
|
28930
29037
|
})
|
|
28931
29038
|
]
|
|
28932
29039
|
}),
|
|
@@ -30249,7 +30356,7 @@ var RenderModalAdvanced = ({
|
|
|
30249
30356
|
|
|
30250
30357
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
30251
30358
|
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
30252
|
-
import { useCallback as useCallback135 } from "react";
|
|
30359
|
+
import { useCallback as useCallback135, useMemo as useMemo138 } from "react";
|
|
30253
30360
|
|
|
30254
30361
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
30255
30362
|
import { useCallback as useCallback132 } from "react";
|
|
@@ -30544,6 +30651,7 @@ var container56 = {
|
|
|
30544
30651
|
flex: 1,
|
|
30545
30652
|
overflowY: "auto"
|
|
30546
30653
|
};
|
|
30654
|
+
var commonSampleRates = [8000, 16000, 22050, 44100, 48000, 96000];
|
|
30547
30655
|
var RenderModalAudio = ({
|
|
30548
30656
|
muted,
|
|
30549
30657
|
setMuted,
|
|
@@ -30561,7 +30669,9 @@ var RenderModalAudio = ({
|
|
|
30561
30669
|
setForSeamlessAacConcatenation,
|
|
30562
30670
|
separateAudioTo,
|
|
30563
30671
|
setSeparateAudioTo,
|
|
30564
|
-
outName
|
|
30672
|
+
outName,
|
|
30673
|
+
sampleRate,
|
|
30674
|
+
setSampleRate
|
|
30565
30675
|
}) => {
|
|
30566
30676
|
const onShouldHaveTargetAudioBitrateChanged = useCallback135((e) => {
|
|
30567
30677
|
setShouldHaveCustomTargetAudioBitrate(e.target.checked);
|
|
@@ -30572,6 +30682,20 @@ var RenderModalAudio = ({
|
|
|
30572
30682
|
const onSeamlessAacConcatenationChanges = useCallback135((e) => {
|
|
30573
30683
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
30574
30684
|
}, [setForSeamlessAacConcatenation]);
|
|
30685
|
+
const sampleRateOptions = useMemo138(() => {
|
|
30686
|
+
return commonSampleRates.map((rate) => ({
|
|
30687
|
+
label: rate === 48000 ? `${rate} Hz (default)` : `${rate} Hz`,
|
|
30688
|
+
onClick: () => setSampleRate(rate),
|
|
30689
|
+
key: String(rate),
|
|
30690
|
+
leftItem: sampleRate === rate ? /* @__PURE__ */ jsx266(Checkmark, {}) : null,
|
|
30691
|
+
id: String(rate),
|
|
30692
|
+
keyHint: null,
|
|
30693
|
+
quickSwitcherLabel: null,
|
|
30694
|
+
subMenu: null,
|
|
30695
|
+
type: "item",
|
|
30696
|
+
value: String(rate)
|
|
30697
|
+
}));
|
|
30698
|
+
}, [sampleRate, setSampleRate]);
|
|
30575
30699
|
const audioCodecOptions = useCallback135((currentCodec) => {
|
|
30576
30700
|
return BrowserSafeApis8.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
|
|
30577
30701
|
return {
|
|
@@ -30712,6 +30836,31 @@ var RenderModalAudio = ({
|
|
|
30712
30836
|
})
|
|
30713
30837
|
})
|
|
30714
30838
|
]
|
|
30839
|
+
}) : null,
|
|
30840
|
+
renderMode !== "still" && !muted ? /* @__PURE__ */ jsxs136("div", {
|
|
30841
|
+
style: optionRow,
|
|
30842
|
+
children: [
|
|
30843
|
+
/* @__PURE__ */ jsxs136("div", {
|
|
30844
|
+
style: label6,
|
|
30845
|
+
children: [
|
|
30846
|
+
"Sample Rate ",
|
|
30847
|
+
/* @__PURE__ */ jsx266(Spacing, {
|
|
30848
|
+
x: 0.5
|
|
30849
|
+
}),
|
|
30850
|
+
/* @__PURE__ */ jsx266(OptionExplainerBubble, {
|
|
30851
|
+
id: "sampleRateOption"
|
|
30852
|
+
})
|
|
30853
|
+
]
|
|
30854
|
+
}),
|
|
30855
|
+
/* @__PURE__ */ jsx266("div", {
|
|
30856
|
+
style: rightRow,
|
|
30857
|
+
children: /* @__PURE__ */ jsx266(Combobox, {
|
|
30858
|
+
values: sampleRateOptions,
|
|
30859
|
+
selectedId: String(sampleRate),
|
|
30860
|
+
title: "Sample Rate"
|
|
30861
|
+
})
|
|
30862
|
+
})
|
|
30863
|
+
]
|
|
30715
30864
|
}) : null
|
|
30716
30865
|
]
|
|
30717
30866
|
});
|
|
@@ -30720,7 +30869,7 @@ var RenderModalAudio = ({
|
|
|
30720
30869
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
30721
30870
|
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
30722
30871
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
30723
|
-
import { useCallback as useCallback138, useMemo as
|
|
30872
|
+
import { useCallback as useCallback138, useMemo as useMemo140 } from "react";
|
|
30724
30873
|
|
|
30725
30874
|
// src/helpers/prores-labels.ts
|
|
30726
30875
|
var labelProResProfile = (profile) => {
|
|
@@ -30749,7 +30898,7 @@ var labelProResProfile = (profile) => {
|
|
|
30749
30898
|
import { useCallback as useCallback137 } from "react";
|
|
30750
30899
|
|
|
30751
30900
|
// src/components/RenderModal/MultiRangeSlider.tsx
|
|
30752
|
-
import { useCallback as useCallback136, useMemo as
|
|
30901
|
+
import { useCallback as useCallback136, useMemo as useMemo139 } from "react";
|
|
30753
30902
|
import { jsx as jsx267, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
30754
30903
|
var container57 = {
|
|
30755
30904
|
borderColor: "black",
|
|
@@ -30779,7 +30928,7 @@ var MultiRangeSlider = ({
|
|
|
30779
30928
|
onRightThumbDrag
|
|
30780
30929
|
}) => {
|
|
30781
30930
|
const getPercent = useCallback136((value) => Math.round((value - min) / (max - min) * 100), [min, max]);
|
|
30782
|
-
const rangeStyle =
|
|
30931
|
+
const rangeStyle = useMemo139(() => {
|
|
30783
30932
|
const minPercent = getPercent(start);
|
|
30784
30933
|
const maxPercent = getPercent(end);
|
|
30785
30934
|
return {
|
|
@@ -30986,7 +31135,7 @@ var RenderModalBasic = ({
|
|
|
30986
31135
|
showOutputName
|
|
30987
31136
|
}) => {
|
|
30988
31137
|
const existence = useFileExistence(outName);
|
|
30989
|
-
const videoCodecOptions =
|
|
31138
|
+
const videoCodecOptions = useMemo140(() => {
|
|
30990
31139
|
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
30991
31140
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
30992
31141
|
}).map((codecOption) => {
|
|
@@ -31004,7 +31153,7 @@ var RenderModalBasic = ({
|
|
|
31004
31153
|
};
|
|
31005
31154
|
});
|
|
31006
31155
|
}, [renderMode, setCodec, codec]);
|
|
31007
|
-
const proResProfileOptions =
|
|
31156
|
+
const proResProfileOptions = useMemo140(() => {
|
|
31008
31157
|
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
31009
31158
|
return {
|
|
31010
31159
|
label: labelProResProfile(option),
|
|
@@ -31036,7 +31185,7 @@ var RenderModalBasic = ({
|
|
|
31036
31185
|
const onValueChange = useCallback138((e) => {
|
|
31037
31186
|
setOutName(e.target.value);
|
|
31038
31187
|
}, [setOutName]);
|
|
31039
|
-
const logLevelOptions =
|
|
31188
|
+
const logLevelOptions = useMemo140(() => {
|
|
31040
31189
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
31041
31190
|
return {
|
|
31042
31191
|
label: humanReadableLogLevel(level),
|
|
@@ -31290,7 +31439,7 @@ var RenderModalGif = ({
|
|
|
31290
31439
|
|
|
31291
31440
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
31292
31441
|
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
31293
|
-
import { useCallback as useCallback141, useMemo as
|
|
31442
|
+
import { useCallback as useCallback141, useMemo as useMemo142 } from "react";
|
|
31294
31443
|
|
|
31295
31444
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
31296
31445
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
@@ -31309,7 +31458,7 @@ var JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
|
31309
31458
|
};
|
|
31310
31459
|
|
|
31311
31460
|
// src/components/RenderModal/ScaleSetting.tsx
|
|
31312
|
-
import { useMemo as
|
|
31461
|
+
import { useMemo as useMemo141 } from "react";
|
|
31313
31462
|
import { jsx as jsx273, jsxs as jsxs142, Fragment as Fragment46 } from "react/jsx-runtime";
|
|
31314
31463
|
var MIN_SCALE = 0.1;
|
|
31315
31464
|
var MAX_SCALE = 10;
|
|
@@ -31323,7 +31472,7 @@ var outputDimensionsStyle = {
|
|
|
31323
31472
|
marginTop: -10
|
|
31324
31473
|
};
|
|
31325
31474
|
var ScaleSetting = ({ scale, setScale, compositionWidth, compositionHeight }) => {
|
|
31326
|
-
const outputDimensions =
|
|
31475
|
+
const outputDimensions = useMemo141(() => {
|
|
31327
31476
|
const outputWidth = Math.round(compositionWidth * scale);
|
|
31328
31477
|
const outputHeight = Math.round(compositionHeight * scale);
|
|
31329
31478
|
return `${outputWidth}×${outputHeight}`;
|
|
@@ -31392,7 +31541,7 @@ var RenderModalPicture = ({
|
|
|
31392
31541
|
compositionWidth,
|
|
31393
31542
|
compositionHeight
|
|
31394
31543
|
}) => {
|
|
31395
|
-
const colorSpaceOptions =
|
|
31544
|
+
const colorSpaceOptions = useMemo142(() => {
|
|
31396
31545
|
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
31397
31546
|
return {
|
|
31398
31547
|
label: option,
|
|
@@ -31408,7 +31557,7 @@ var RenderModalPicture = ({
|
|
|
31408
31557
|
};
|
|
31409
31558
|
});
|
|
31410
31559
|
}, [colorSpace, setColorSpace]);
|
|
31411
|
-
const qualityControlOptions =
|
|
31560
|
+
const qualityControlOptions = useMemo142(() => {
|
|
31412
31561
|
return qualityControlModes.map((option) => {
|
|
31413
31562
|
return {
|
|
31414
31563
|
label: option === "crf" ? "CRF" : "Bitrate",
|
|
@@ -31730,6 +31879,7 @@ var RenderModal = ({
|
|
|
31730
31879
|
initialForSeamlessAacConcatenation,
|
|
31731
31880
|
renderTypeOfLastRender,
|
|
31732
31881
|
initialHardwareAcceleration,
|
|
31882
|
+
initialSampleRate,
|
|
31733
31883
|
defaultMetadata,
|
|
31734
31884
|
initialChromeMode,
|
|
31735
31885
|
renderDefaults
|
|
@@ -31787,6 +31937,7 @@ var RenderModal = ({
|
|
|
31787
31937
|
const [repro, setRepro] = useState93(() => initialRepro);
|
|
31788
31938
|
const [enforceAudioTrackState, setEnforceAudioTrackState] = useState93(() => initialEnforceAudioTrack);
|
|
31789
31939
|
const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState93(() => initialForSeamlessAacConcatenation);
|
|
31940
|
+
const [sampleRate, setSampleRate] = useState93(() => initialSampleRate);
|
|
31790
31941
|
const [renderMode, setRenderModeState] = useState93(initialRenderType);
|
|
31791
31942
|
const [jpegQuality, setJpegQuality] = useState93(() => initialJpegQuality);
|
|
31792
31943
|
const [scale, setScale] = useState93(() => initialScale);
|
|
@@ -31801,7 +31952,7 @@ var RenderModal = ({
|
|
|
31801
31952
|
const [openGlOption, setOpenGlOption] = useState93(() => initialGl ?? "default");
|
|
31802
31953
|
const [colorSpace, setColorSpace] = useState93(() => initialColorSpace);
|
|
31803
31954
|
const [userAgent, setUserAgent] = useState93(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
|
|
31804
|
-
const chromiumOptions =
|
|
31955
|
+
const chromiumOptions = useMemo143(() => {
|
|
31805
31956
|
return {
|
|
31806
31957
|
headless,
|
|
31807
31958
|
disableWebSecurity,
|
|
@@ -31843,19 +31994,19 @@ var RenderModal = ({
|
|
|
31843
31994
|
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState93(initialOffthreadVideoCacheSizeInBytes);
|
|
31844
31995
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState93(initialMediaCacheSizeInBytes);
|
|
31845
31996
|
const [offthreadVideoThreads, setOffthreadVideoThreads] = useState93(() => initialOffthreadVideoThreads);
|
|
31846
|
-
const codec =
|
|
31997
|
+
const codec = useMemo143(() => {
|
|
31847
31998
|
if (renderMode === "audio") {
|
|
31848
31999
|
return videoCodecForAudioTab;
|
|
31849
32000
|
}
|
|
31850
32001
|
return videoCodecForVideoTab;
|
|
31851
32002
|
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
31852
|
-
const numberOfGifLoops =
|
|
32003
|
+
const numberOfGifLoops = useMemo143(() => {
|
|
31853
32004
|
if (codec === "gif" && limitNumberOfGifLoops) {
|
|
31854
32005
|
return numberOfGifLoopsSetting;
|
|
31855
32006
|
}
|
|
31856
32007
|
return null;
|
|
31857
32008
|
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
31858
|
-
const audioBitrate =
|
|
32009
|
+
const audioBitrate = useMemo143(() => {
|
|
31859
32010
|
if (shouldHaveCustomTargetAudioBitrate) {
|
|
31860
32011
|
return customTargetAudioBitrate;
|
|
31861
32012
|
}
|
|
@@ -31863,10 +32014,10 @@ var RenderModal = ({
|
|
|
31863
32014
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
31864
32015
|
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
31865
32016
|
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
31866
|
-
const supportsBothQualityControls =
|
|
32017
|
+
const supportsBothQualityControls = useMemo143(() => {
|
|
31867
32018
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
31868
32019
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
31869
|
-
const qualityControlType =
|
|
32020
|
+
const qualityControlType = useMemo143(() => {
|
|
31870
32021
|
if (hardwareAcceleration === "if-possible" || hardwareAcceleration === "required") {
|
|
31871
32022
|
if (supportsVideoBitrate) {
|
|
31872
32023
|
return "bitrate";
|
|
@@ -31890,7 +32041,7 @@ var RenderModal = ({
|
|
|
31890
32041
|
supportsCrf,
|
|
31891
32042
|
supportsVideoBitrate
|
|
31892
32043
|
]);
|
|
31893
|
-
const videoBitrate =
|
|
32044
|
+
const videoBitrate = useMemo143(() => {
|
|
31894
32045
|
if (qualityControlType === "bitrate") {
|
|
31895
32046
|
return customTargetVideoBitrate;
|
|
31896
32047
|
}
|
|
@@ -31902,13 +32053,13 @@ var RenderModal = ({
|
|
|
31902
32053
|
return;
|
|
31903
32054
|
dispatch(payload);
|
|
31904
32055
|
}, []);
|
|
31905
|
-
const muted =
|
|
32056
|
+
const muted = useMemo143(() => {
|
|
31906
32057
|
if (renderMode === "video") {
|
|
31907
32058
|
return mutedState;
|
|
31908
32059
|
}
|
|
31909
32060
|
return false;
|
|
31910
32061
|
}, [mutedState, renderMode]);
|
|
31911
|
-
const enforceAudioTrack =
|
|
32062
|
+
const enforceAudioTrack = useMemo143(() => {
|
|
31912
32063
|
if (renderMode === "video") {
|
|
31913
32064
|
return enforceAudioTrackState;
|
|
31914
32065
|
}
|
|
@@ -31917,13 +32068,13 @@ var RenderModal = ({
|
|
|
31917
32068
|
}
|
|
31918
32069
|
return false;
|
|
31919
32070
|
}, [enforceAudioTrackState, renderMode]);
|
|
31920
|
-
const proResProfile =
|
|
32071
|
+
const proResProfile = useMemo143(() => {
|
|
31921
32072
|
if (renderMode === "video" && codec === "prores") {
|
|
31922
32073
|
return proResProfileSetting;
|
|
31923
32074
|
}
|
|
31924
32075
|
return null;
|
|
31925
32076
|
}, [codec, proResProfileSetting, renderMode]);
|
|
31926
|
-
const x264Preset =
|
|
32077
|
+
const x264Preset = useMemo143(() => {
|
|
31927
32078
|
if (renderMode === "video" && codec === "h264") {
|
|
31928
32079
|
return x264PresetSetting;
|
|
31929
32080
|
}
|
|
@@ -31934,19 +32085,19 @@ var RenderModal = ({
|
|
|
31934
32085
|
_setInputProps(updater);
|
|
31935
32086
|
}, []);
|
|
31936
32087
|
const [metadata] = useState93(() => defaultMetadata);
|
|
31937
|
-
const endFrame =
|
|
32088
|
+
const endFrame = useMemo143(() => {
|
|
31938
32089
|
if (endFrameOrNull === null) {
|
|
31939
32090
|
return resolvedComposition.durationInFrames - 1;
|
|
31940
32091
|
}
|
|
31941
32092
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrameOrNull));
|
|
31942
32093
|
}, [resolvedComposition.durationInFrames, endFrameOrNull]);
|
|
31943
|
-
const startFrame =
|
|
32094
|
+
const startFrame = useMemo143(() => {
|
|
31944
32095
|
if (startFrameOrNull === null) {
|
|
31945
32096
|
return 0;
|
|
31946
32097
|
}
|
|
31947
32098
|
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
31948
32099
|
}, [endFrame, startFrameOrNull]);
|
|
31949
|
-
const frame2 =
|
|
32100
|
+
const frame2 = useMemo143(() => {
|
|
31950
32101
|
const parsed = Math.floor(unclampedFrame);
|
|
31951
32102
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
31952
32103
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
@@ -32067,17 +32218,17 @@ var RenderModal = ({
|
|
|
32067
32218
|
mediaCacheSizeInBytes
|
|
32068
32219
|
]);
|
|
32069
32220
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = useState93(() => initialEveryNthFrame);
|
|
32070
|
-
const everyNthFrame =
|
|
32221
|
+
const everyNthFrame = useMemo143(() => {
|
|
32071
32222
|
if (codec === "gif") {
|
|
32072
32223
|
return everyNthFrameSetting;
|
|
32073
32224
|
}
|
|
32074
32225
|
return 1;
|
|
32075
32226
|
}, [codec, everyNthFrameSetting]);
|
|
32076
32227
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
32077
|
-
const availablePixelFormats =
|
|
32228
|
+
const availablePixelFormats = useMemo143(() => {
|
|
32078
32229
|
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
32079
32230
|
}, [codec]);
|
|
32080
|
-
const pixelFormat =
|
|
32231
|
+
const pixelFormat = useMemo143(() => {
|
|
32081
32232
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
32082
32233
|
return userPreferredPixelFormat;
|
|
32083
32234
|
}
|
|
@@ -32128,7 +32279,8 @@ var RenderModal = ({
|
|
|
32128
32279
|
hardwareAcceleration,
|
|
32129
32280
|
chromeMode,
|
|
32130
32281
|
offthreadVideoThreads,
|
|
32131
|
-
mediaCacheSizeInBytes
|
|
32282
|
+
mediaCacheSizeInBytes,
|
|
32283
|
+
sampleRate
|
|
32132
32284
|
}).then(() => {
|
|
32133
32285
|
dispatchIfMounted({ type: "succeed" });
|
|
32134
32286
|
setSelectedModal(null);
|
|
@@ -32180,7 +32332,8 @@ var RenderModal = ({
|
|
|
32180
32332
|
hardwareAcceleration,
|
|
32181
32333
|
chromeMode,
|
|
32182
32334
|
offthreadVideoThreads,
|
|
32183
|
-
mediaCacheSizeInBytes
|
|
32335
|
+
mediaCacheSizeInBytes,
|
|
32336
|
+
sampleRate
|
|
32184
32337
|
]);
|
|
32185
32338
|
const onClickSequence = useCallback142(() => {
|
|
32186
32339
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
@@ -32248,7 +32401,7 @@ var RenderModal = ({
|
|
|
32248
32401
|
isMounted.current = false;
|
|
32249
32402
|
};
|
|
32250
32403
|
}, []);
|
|
32251
|
-
const imageFormatOptions =
|
|
32404
|
+
const imageFormatOptions = useMemo143(() => {
|
|
32252
32405
|
if (renderMode === "still") {
|
|
32253
32406
|
return [
|
|
32254
32407
|
{
|
|
@@ -32344,7 +32497,7 @@ var RenderModal = ({
|
|
|
32344
32497
|
stillImageFormat,
|
|
32345
32498
|
videoCodecForVideoTab
|
|
32346
32499
|
]);
|
|
32347
|
-
const renderTabOptions =
|
|
32500
|
+
const renderTabOptions = useMemo143(() => {
|
|
32348
32501
|
if (resolvedComposition?.durationInFrames < 2) {
|
|
32349
32502
|
return [
|
|
32350
32503
|
{
|
|
@@ -32402,7 +32555,7 @@ var RenderModal = ({
|
|
|
32402
32555
|
});
|
|
32403
32556
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
32404
32557
|
const { registerKeybinding } = useKeybinding();
|
|
32405
|
-
const readOnlyRenderCommand =
|
|
32558
|
+
const readOnlyRenderCommand = useMemo143(() => {
|
|
32406
32559
|
if (!readOnlyStudio) {
|
|
32407
32560
|
return null;
|
|
32408
32561
|
}
|
|
@@ -32458,6 +32611,7 @@ var RenderModal = ({
|
|
|
32458
32611
|
beepOnFinish,
|
|
32459
32612
|
repro,
|
|
32460
32613
|
metadata,
|
|
32614
|
+
sampleRate,
|
|
32461
32615
|
envVariables: envVariablesArrayToObject(envVariables),
|
|
32462
32616
|
inputProps
|
|
32463
32617
|
});
|
|
@@ -32507,6 +32661,7 @@ var RenderModal = ({
|
|
|
32507
32661
|
resolvedComposition.durationInFrames,
|
|
32508
32662
|
resolvedComposition.id,
|
|
32509
32663
|
scale,
|
|
32664
|
+
sampleRate,
|
|
32510
32665
|
separateAudioTo,
|
|
32511
32666
|
sequenceImageFormat,
|
|
32512
32667
|
startFrame,
|
|
@@ -32573,7 +32728,7 @@ var RenderModal = ({
|
|
|
32573
32728
|
enter.unregister();
|
|
32574
32729
|
};
|
|
32575
32730
|
}, [registerKeybinding, renderDisabled, trigger]);
|
|
32576
|
-
const pixelFormatOptions =
|
|
32731
|
+
const pixelFormatOptions = useMemo143(() => {
|
|
32577
32732
|
return availablePixelFormats.map((option) => {
|
|
32578
32733
|
return {
|
|
32579
32734
|
label: option,
|
|
@@ -32783,7 +32938,9 @@ var RenderModal = ({
|
|
|
32783
32938
|
setForSeamlessAacConcatenation,
|
|
32784
32939
|
separateAudioTo,
|
|
32785
32940
|
setSeparateAudioTo,
|
|
32786
|
-
outName
|
|
32941
|
+
outName,
|
|
32942
|
+
sampleRate,
|
|
32943
|
+
setSampleRate
|
|
32787
32944
|
}) : tab === "gif" ? /* @__PURE__ */ jsx275(RenderModalGif, {
|
|
32788
32945
|
everyNthFrame,
|
|
32789
32946
|
limitNumberOfGifLoops,
|
|
@@ -32870,7 +33027,7 @@ import {
|
|
|
32870
33027
|
getDefaultVideoCodecForContainer,
|
|
32871
33028
|
isAudioOnlyContainer
|
|
32872
33029
|
} from "@remotion/web-renderer";
|
|
32873
|
-
import { useCallback as useCallback146, useContext as useContext95, useMemo as
|
|
33030
|
+
import { useCallback as useCallback146, useContext as useContext95, useMemo as useMemo148, useState as useState97 } from "react";
|
|
32874
33031
|
|
|
32875
33032
|
// src/icons/certificate.tsx
|
|
32876
33033
|
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
@@ -33032,7 +33189,7 @@ var WebRendererExperimentalBadge = () => {
|
|
|
33032
33189
|
};
|
|
33033
33190
|
|
|
33034
33191
|
// src/components/RenderModal/WebRenderModalAdvanced.tsx
|
|
33035
|
-
import { useCallback as useCallback143, useMemo as
|
|
33192
|
+
import { useCallback as useCallback143, useMemo as useMemo144 } from "react";
|
|
33036
33193
|
import { jsx as jsx278, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
33037
33194
|
var tabContainer = {
|
|
33038
33195
|
flex: 1
|
|
@@ -33044,7 +33201,9 @@ var WebRenderModalAdvanced = ({
|
|
|
33044
33201
|
mediaCacheSizeInBytes,
|
|
33045
33202
|
setMediaCacheSizeInBytes,
|
|
33046
33203
|
hardwareAcceleration,
|
|
33047
|
-
setHardwareAcceleration
|
|
33204
|
+
setHardwareAcceleration,
|
|
33205
|
+
allowHtmlInCanvas,
|
|
33206
|
+
setAllowHtmlInCanvas
|
|
33048
33207
|
}) => {
|
|
33049
33208
|
const toggleCustomMediaCacheSizeInBytes = useCallback143(() => {
|
|
33050
33209
|
setMediaCacheSizeInBytes((previous) => {
|
|
@@ -33054,6 +33213,9 @@ var WebRenderModalAdvanced = ({
|
|
|
33054
33213
|
return null;
|
|
33055
33214
|
});
|
|
33056
33215
|
}, [setMediaCacheSizeInBytes]);
|
|
33216
|
+
const toggleAllowHtmlInCanvas = useCallback143(() => {
|
|
33217
|
+
setAllowHtmlInCanvas((prev) => !prev);
|
|
33218
|
+
}, [setAllowHtmlInCanvas]);
|
|
33057
33219
|
const changeMediaCacheSizeInBytes = useCallback143((cb) => {
|
|
33058
33220
|
setMediaCacheSizeInBytes((prev) => {
|
|
33059
33221
|
if (prev === null) {
|
|
@@ -33065,7 +33227,7 @@ var WebRenderModalAdvanced = ({
|
|
|
33065
33227
|
return cb;
|
|
33066
33228
|
});
|
|
33067
33229
|
}, [setMediaCacheSizeInBytes]);
|
|
33068
|
-
const hardwareAccelerationOptions =
|
|
33230
|
+
const hardwareAccelerationOptions = useMemo144(() => {
|
|
33069
33231
|
return [
|
|
33070
33232
|
{
|
|
33071
33233
|
label: "No Preference",
|
|
@@ -33165,14 +33327,39 @@ var WebRenderModalAdvanced = ({
|
|
|
33165
33327
|
})
|
|
33166
33328
|
})
|
|
33167
33329
|
]
|
|
33168
|
-
}) : null
|
|
33330
|
+
}) : null,
|
|
33331
|
+
/* @__PURE__ */ jsxs146("div", {
|
|
33332
|
+
style: optionRow,
|
|
33333
|
+
children: [
|
|
33334
|
+
/* @__PURE__ */ jsxs146("div", {
|
|
33335
|
+
style: label6,
|
|
33336
|
+
children: [
|
|
33337
|
+
"Allow HTML-in-canvas ",
|
|
33338
|
+
/* @__PURE__ */ jsx278(Spacing, {
|
|
33339
|
+
x: 0.5
|
|
33340
|
+
}),
|
|
33341
|
+
/* @__PURE__ */ jsx278(OptionExplainerBubble, {
|
|
33342
|
+
id: "allowHtmlInCanvasOption"
|
|
33343
|
+
})
|
|
33344
|
+
]
|
|
33345
|
+
}),
|
|
33346
|
+
/* @__PURE__ */ jsx278("div", {
|
|
33347
|
+
style: rightRow,
|
|
33348
|
+
children: /* @__PURE__ */ jsx278(Checkbox, {
|
|
33349
|
+
checked: allowHtmlInCanvas,
|
|
33350
|
+
onChange: toggleAllowHtmlInCanvas,
|
|
33351
|
+
name: "allow-html-in-canvas"
|
|
33352
|
+
})
|
|
33353
|
+
})
|
|
33354
|
+
]
|
|
33355
|
+
})
|
|
33169
33356
|
]
|
|
33170
33357
|
});
|
|
33171
33358
|
};
|
|
33172
33359
|
|
|
33173
33360
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
33174
33361
|
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
33175
|
-
import { useMemo as
|
|
33362
|
+
import { useMemo as useMemo145 } from "react";
|
|
33176
33363
|
|
|
33177
33364
|
// src/components/RenderModal/quality-options.tsx
|
|
33178
33365
|
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
@@ -33245,8 +33432,8 @@ var WebRenderModalAudio = ({
|
|
|
33245
33432
|
encodableCodecs,
|
|
33246
33433
|
effectiveAudioCodec
|
|
33247
33434
|
}) => {
|
|
33248
|
-
const containerSupported =
|
|
33249
|
-
const audioCodecOptions =
|
|
33435
|
+
const containerSupported = useMemo145(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
33436
|
+
const audioCodecOptions = useMemo145(() => {
|
|
33250
33437
|
return containerSupported.map((codec) => {
|
|
33251
33438
|
const isEncodable = encodableCodecs.includes(codec);
|
|
33252
33439
|
return {
|
|
@@ -33263,7 +33450,7 @@ var WebRenderModalAudio = ({
|
|
|
33263
33450
|
};
|
|
33264
33451
|
});
|
|
33265
33452
|
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
33266
|
-
const audioBitrateOptions =
|
|
33453
|
+
const audioBitrateOptions = useMemo145(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
33267
33454
|
const isAudioOnly = renderMode === "audio";
|
|
33268
33455
|
const showAudioSettings = isAudioOnly || !muted;
|
|
33269
33456
|
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
@@ -33340,7 +33527,7 @@ var WebRenderModalAudio = ({
|
|
|
33340
33527
|
};
|
|
33341
33528
|
|
|
33342
33529
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
33343
|
-
import { useMemo as
|
|
33530
|
+
import { useMemo as useMemo146 } from "react";
|
|
33344
33531
|
import { jsx as jsx281, jsxs as jsxs148, Fragment as Fragment49 } from "react/jsx-runtime";
|
|
33345
33532
|
var tabContainer2 = {
|
|
33346
33533
|
flex: 1
|
|
@@ -33394,7 +33581,7 @@ var WebRenderModalBasic = ({
|
|
|
33394
33581
|
logLevel,
|
|
33395
33582
|
setLogLevel
|
|
33396
33583
|
}) => {
|
|
33397
|
-
const imageFormatOptions =
|
|
33584
|
+
const imageFormatOptions = useMemo146(() => {
|
|
33398
33585
|
return [
|
|
33399
33586
|
{
|
|
33400
33587
|
label: "PNG",
|
|
@@ -33416,7 +33603,7 @@ var WebRenderModalBasic = ({
|
|
|
33416
33603
|
}
|
|
33417
33604
|
];
|
|
33418
33605
|
}, [imageFormat, setStillFormat]);
|
|
33419
|
-
const logLevelOptions =
|
|
33606
|
+
const logLevelOptions = useMemo146(() => {
|
|
33420
33607
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
33421
33608
|
return {
|
|
33422
33609
|
label: humanReadableLogLevel(level),
|
|
@@ -33431,7 +33618,7 @@ var WebRenderModalBasic = ({
|
|
|
33431
33618
|
};
|
|
33432
33619
|
});
|
|
33433
33620
|
}, [logLevel, setLogLevel]);
|
|
33434
|
-
const containerOptions =
|
|
33621
|
+
const containerOptions = useMemo146(() => {
|
|
33435
33622
|
const containers = renderMode === "audio" ? audioContainers : videoContainers;
|
|
33436
33623
|
return containers.map((c) => ({
|
|
33437
33624
|
label: containerLabels[c],
|
|
@@ -33445,7 +33632,7 @@ var WebRenderModalBasic = ({
|
|
|
33445
33632
|
value: c
|
|
33446
33633
|
}));
|
|
33447
33634
|
}, [container62, setContainerFormat, renderMode]);
|
|
33448
|
-
const codecOptions =
|
|
33635
|
+
const codecOptions = useMemo146(() => {
|
|
33449
33636
|
return encodableVideoCodecs.map((c) => ({
|
|
33450
33637
|
label: codecLabels[c],
|
|
33451
33638
|
onClick: () => setCodec(c),
|
|
@@ -34035,7 +34222,7 @@ var WebRenderModalLicense = ({
|
|
|
34035
34222
|
};
|
|
34036
34223
|
|
|
34037
34224
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
34038
|
-
import { useCallback as useCallback145, useMemo as
|
|
34225
|
+
import { useCallback as useCallback145, useMemo as useMemo147 } from "react";
|
|
34039
34226
|
import { jsx as jsx285, jsxs as jsxs151, Fragment as Fragment51 } from "react/jsx-runtime";
|
|
34040
34227
|
var tabContainer4 = {
|
|
34041
34228
|
flex: 1
|
|
@@ -34053,7 +34240,7 @@ var WebRenderModalPicture = ({
|
|
|
34053
34240
|
compositionWidth,
|
|
34054
34241
|
compositionHeight
|
|
34055
34242
|
}) => {
|
|
34056
|
-
const qualityOptions =
|
|
34243
|
+
const qualityOptions = useMemo147(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
34057
34244
|
const onTransparentChanged = useCallback145((e) => {
|
|
34058
34245
|
setTransparent(e.target.checked);
|
|
34059
34246
|
}, [setTransparent]);
|
|
@@ -34182,7 +34369,8 @@ var WebRenderModal = ({
|
|
|
34182
34369
|
initialHardwareAcceleration,
|
|
34183
34370
|
initialKeyframeIntervalInSeconds,
|
|
34184
34371
|
initialTransparent,
|
|
34185
|
-
initialMuted
|
|
34372
|
+
initialMuted,
|
|
34373
|
+
initialAllowHtmlInCanvas
|
|
34186
34374
|
}) => {
|
|
34187
34375
|
const context = useContext95(ResolvedCompositionContext);
|
|
34188
34376
|
const { setSelectedModal } = useContext95(ModalsContext);
|
|
@@ -34222,27 +34410,28 @@ var WebRenderModal = ({
|
|
|
34222
34410
|
const [muted, setMuted] = useState97(initialMuted ?? false);
|
|
34223
34411
|
const [scale, setScale] = useState97(initialScale ?? 1);
|
|
34224
34412
|
const [licenseKey, setLicenseKey] = useState97(initialLicenseKey);
|
|
34413
|
+
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState97(initialAllowHtmlInCanvas ?? false);
|
|
34225
34414
|
const encodableAudioCodecs = useEncodableAudioCodecs(container62);
|
|
34226
34415
|
const encodableVideoCodecs = useEncodableVideoCodecs(container62);
|
|
34227
|
-
const effectiveAudioCodec =
|
|
34416
|
+
const effectiveAudioCodec = useMemo148(() => {
|
|
34228
34417
|
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
34229
34418
|
return audioCodec;
|
|
34230
34419
|
}
|
|
34231
34420
|
return encodableAudioCodecs[0] ?? audioCodec;
|
|
34232
34421
|
}, [audioCodec, encodableAudioCodecs]);
|
|
34233
|
-
const effectiveVideoCodec =
|
|
34422
|
+
const effectiveVideoCodec = useMemo148(() => {
|
|
34234
34423
|
if (encodableVideoCodecs.includes(codec)) {
|
|
34235
34424
|
return codec;
|
|
34236
34425
|
}
|
|
34237
34426
|
return encodableVideoCodecs[0] ?? codec;
|
|
34238
34427
|
}, [codec, encodableVideoCodecs]);
|
|
34239
|
-
const finalEndFrame =
|
|
34428
|
+
const finalEndFrame = useMemo148(() => {
|
|
34240
34429
|
if (endFrame === null) {
|
|
34241
34430
|
return resolvedComposition.durationInFrames - 1;
|
|
34242
34431
|
}
|
|
34243
34432
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
34244
34433
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
34245
|
-
const finalStartFrame =
|
|
34434
|
+
const finalStartFrame = useMemo148(() => {
|
|
34246
34435
|
if (startFrame === null) {
|
|
34247
34436
|
return 0;
|
|
34248
34437
|
}
|
|
@@ -34307,7 +34496,7 @@ var WebRenderModal = ({
|
|
|
34307
34496
|
setTab((prev) => prev === "audio" ? "general" : prev);
|
|
34308
34497
|
}
|
|
34309
34498
|
}, [container62, imageFormat, updateOutNameExtension]);
|
|
34310
|
-
const renderTabOptions =
|
|
34499
|
+
const renderTabOptions = useMemo148(() => {
|
|
34311
34500
|
const options = [
|
|
34312
34501
|
{
|
|
34313
34502
|
label: "Still",
|
|
@@ -34353,7 +34542,7 @@ var WebRenderModal = ({
|
|
|
34353
34542
|
const onOutNameChange = useCallback146((e) => {
|
|
34354
34543
|
setOutName(e.target.value);
|
|
34355
34544
|
}, []);
|
|
34356
|
-
const outnameValidation =
|
|
34545
|
+
const outnameValidation = useMemo148(() => {
|
|
34357
34546
|
if (renderMode === "still") {
|
|
34358
34547
|
return validateOutnameForStill({
|
|
34359
34548
|
outName,
|
|
@@ -34414,7 +34603,8 @@ var WebRenderModal = ({
|
|
|
34414
34603
|
mediaCacheSizeInBytes,
|
|
34415
34604
|
logLevel,
|
|
34416
34605
|
licenseKey,
|
|
34417
|
-
scale
|
|
34606
|
+
scale,
|
|
34607
|
+
allowHtmlInCanvas
|
|
34418
34608
|
}, compositionRef);
|
|
34419
34609
|
} else {
|
|
34420
34610
|
addClientVideoJob({
|
|
@@ -34437,7 +34627,8 @@ var WebRenderModal = ({
|
|
|
34437
34627
|
mediaCacheSizeInBytes,
|
|
34438
34628
|
logLevel,
|
|
34439
34629
|
licenseKey,
|
|
34440
|
-
scale
|
|
34630
|
+
scale,
|
|
34631
|
+
allowHtmlInCanvas
|
|
34441
34632
|
}, compositionRef);
|
|
34442
34633
|
}
|
|
34443
34634
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
@@ -34477,7 +34668,8 @@ var WebRenderModal = ({
|
|
|
34477
34668
|
setSelectedModal,
|
|
34478
34669
|
addClientStillJob,
|
|
34479
34670
|
addClientVideoJob,
|
|
34480
|
-
scale
|
|
34671
|
+
scale,
|
|
34672
|
+
allowHtmlInCanvas
|
|
34481
34673
|
]);
|
|
34482
34674
|
return /* @__PURE__ */ jsxs152("div", {
|
|
34483
34675
|
style: outerModalStyle,
|
|
@@ -34672,7 +34864,9 @@ var WebRenderModal = ({
|
|
|
34672
34864
|
mediaCacheSizeInBytes,
|
|
34673
34865
|
setMediaCacheSizeInBytes,
|
|
34674
34866
|
hardwareAcceleration,
|
|
34675
|
-
setHardwareAcceleration
|
|
34867
|
+
setHardwareAcceleration,
|
|
34868
|
+
allowHtmlInCanvas,
|
|
34869
|
+
setAllowHtmlInCanvas
|
|
34676
34870
|
}) : /* @__PURE__ */ jsx286(WebRenderModalLicense, {
|
|
34677
34871
|
licenseKey,
|
|
34678
34872
|
setLicenseKey,
|
|
@@ -34696,7 +34890,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
34696
34890
|
};
|
|
34697
34891
|
|
|
34698
34892
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
34699
|
-
import { useCallback as useCallback149, useMemo as
|
|
34893
|
+
import { useCallback as useCallback149, useMemo as useMemo150 } from "react";
|
|
34700
34894
|
|
|
34701
34895
|
// src/components/CopyButton.tsx
|
|
34702
34896
|
import { useCallback as useCallback147, useEffect as useEffect88, useState as useState98 } from "react";
|
|
@@ -34762,7 +34956,7 @@ var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
|
|
|
34762
34956
|
};
|
|
34763
34957
|
|
|
34764
34958
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
34765
|
-
import { useCallback as useCallback148, useMemo as
|
|
34959
|
+
import { useCallback as useCallback148, useMemo as useMemo149, useState as useState99 } from "react";
|
|
34766
34960
|
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
34767
34961
|
var svgStyle2 = {
|
|
34768
34962
|
width: "11px",
|
|
@@ -34782,7 +34976,7 @@ var OpenIssueButton = ({ link: link5 }) => {
|
|
|
34782
34976
|
const handleClick = useCallback148(() => {
|
|
34783
34977
|
window.open(link5, "_blank");
|
|
34784
34978
|
}, [link5]);
|
|
34785
|
-
const svgFillColor =
|
|
34979
|
+
const svgFillColor = useMemo149(() => {
|
|
34786
34980
|
return hovered ? "white" : LIGHT_TEXT;
|
|
34787
34981
|
}, [hovered]);
|
|
34788
34982
|
const openInEditorSvg = /* @__PURE__ */ jsx288("svg", {
|
|
@@ -34879,7 +35073,7 @@ var commands = {
|
|
|
34879
35073
|
unknown: "npx remotion upgrade"
|
|
34880
35074
|
};
|
|
34881
35075
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
34882
|
-
const hasKnownBugs =
|
|
35076
|
+
const hasKnownBugs = useMemo150(() => {
|
|
34883
35077
|
return knownBugs && knownBugs?.length > 0;
|
|
34884
35078
|
}, [knownBugs]);
|
|
34885
35079
|
const command = commands[info.packageManager];
|
|
@@ -35043,6 +35237,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
35043
35237
|
renderTypeOfLastRender: modalContextType.renderTypeOfLastRender,
|
|
35044
35238
|
defaultMetadata: modalContextType.defaulMetadata,
|
|
35045
35239
|
initialHardwareAcceleration: modalContextType.initialHardwareAcceleration,
|
|
35240
|
+
initialSampleRate: modalContextType.initialSampleRate,
|
|
35046
35241
|
initialChromeMode: modalContextType.initialChromeMode,
|
|
35047
35242
|
renderDefaults: modalContextType.renderDefaults
|
|
35048
35243
|
}) : null,
|
|
@@ -35087,7 +35282,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
35087
35282
|
const onMounted = useCallback150(() => {
|
|
35088
35283
|
setCanvasMounted(true);
|
|
35089
35284
|
}, []);
|
|
35090
|
-
const value =
|
|
35285
|
+
const value = useMemo151(() => {
|
|
35091
35286
|
if (!size4) {
|
|
35092
35287
|
return null;
|
|
35093
35288
|
}
|
|
@@ -35096,15 +35291,15 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
35096
35291
|
canvasSize: size4
|
|
35097
35292
|
};
|
|
35098
35293
|
}, [size4]);
|
|
35099
|
-
const MemoRoot =
|
|
35294
|
+
const MemoRoot = useMemo151(() => {
|
|
35100
35295
|
return React189.memo(Root);
|
|
35101
35296
|
}, [Root]);
|
|
35102
35297
|
const [renderError, setRenderError] = useState100(null);
|
|
35103
35298
|
const clearError = useCallback150(() => {
|
|
35104
35299
|
setRenderError(null);
|
|
35105
35300
|
}, []);
|
|
35106
|
-
const compositionRenderErrorContextValue =
|
|
35107
|
-
const renderErrorContextValue =
|
|
35301
|
+
const compositionRenderErrorContextValue = useMemo151(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
35302
|
+
const renderErrorContextValue = useMemo151(() => ({ error: renderError }), [renderError]);
|
|
35108
35303
|
return /* @__PURE__ */ jsx292(HigherZIndex, {
|
|
35109
35304
|
onEscape: noop,
|
|
35110
35305
|
onOutsideClick: noop,
|
|
@@ -35155,7 +35350,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
35155
35350
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
35156
35351
|
|
|
35157
35352
|
// src/state/preview-size.tsx
|
|
35158
|
-
import { useCallback as useCallback151, useContext as useContext97, useMemo as
|
|
35353
|
+
import { useCallback as useCallback151, useContext as useContext97, useMemo as useMemo152, useState as useState101 } from "react";
|
|
35159
35354
|
import { Internals as Internals66 } from "remotion";
|
|
35160
35355
|
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
35161
35356
|
var key5 = "remotion.previewSize";
|
|
@@ -35191,7 +35386,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
35191
35386
|
return newVal;
|
|
35192
35387
|
});
|
|
35193
35388
|
}, []);
|
|
35194
|
-
const previewSizeCtx =
|
|
35389
|
+
const previewSizeCtx = useMemo152(() => {
|
|
35195
35390
|
return {
|
|
35196
35391
|
size: editorZoomGestures ? size4 : {
|
|
35197
35392
|
size: size4.size,
|
|
@@ -35212,7 +35407,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
35212
35407
|
};
|
|
35213
35408
|
|
|
35214
35409
|
// src/components/CheckerboardProvider.tsx
|
|
35215
|
-
import { useCallback as useCallback152, useMemo as
|
|
35410
|
+
import { useCallback as useCallback152, useMemo as useMemo153, useState as useState102 } from "react";
|
|
35216
35411
|
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
35217
35412
|
var CheckerboardProvider = ({ children }) => {
|
|
35218
35413
|
const [checkerboard, setCheckerboardState] = useState102(() => loadCheckerboardOption());
|
|
@@ -35223,7 +35418,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
35223
35418
|
return newVal;
|
|
35224
35419
|
});
|
|
35225
35420
|
}, []);
|
|
35226
|
-
const checkerboardCtx =
|
|
35421
|
+
const checkerboardCtx = useMemo153(() => {
|
|
35227
35422
|
return {
|
|
35228
35423
|
checkerboard,
|
|
35229
35424
|
setCheckerboard
|
|
@@ -35236,19 +35431,19 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
35236
35431
|
};
|
|
35237
35432
|
|
|
35238
35433
|
// src/components/MediaVolumeProvider.tsx
|
|
35239
|
-
import { useMemo as
|
|
35434
|
+
import { useMemo as useMemo154, useState as useState103 } from "react";
|
|
35240
35435
|
import { Internals as Internals67 } from "remotion";
|
|
35241
35436
|
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
35242
35437
|
var MediaVolumeProvider = ({ children }) => {
|
|
35243
35438
|
const [mediaMuted, setMediaMuted] = useState103(() => loadMuteOption());
|
|
35244
35439
|
const [mediaVolume, setMediaVolume] = useState103(1);
|
|
35245
|
-
const mediaVolumeContextValue =
|
|
35440
|
+
const mediaVolumeContextValue = useMemo154(() => {
|
|
35246
35441
|
return {
|
|
35247
35442
|
mediaMuted,
|
|
35248
35443
|
mediaVolume
|
|
35249
35444
|
};
|
|
35250
35445
|
}, [mediaMuted, mediaVolume]);
|
|
35251
|
-
const setMediaVolumeContextValue =
|
|
35446
|
+
const setMediaVolumeContextValue = useMemo154(() => {
|
|
35252
35447
|
return {
|
|
35253
35448
|
setMediaMuted,
|
|
35254
35449
|
setMediaVolume
|
|
@@ -35264,11 +35459,11 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
35264
35459
|
};
|
|
35265
35460
|
|
|
35266
35461
|
// src/components/ModalsProvider.tsx
|
|
35267
|
-
import { useMemo as
|
|
35462
|
+
import { useMemo as useMemo155, useState as useState104 } from "react";
|
|
35268
35463
|
import { jsx as jsx296 } from "react/jsx-runtime";
|
|
35269
35464
|
var ModalsProvider = ({ children }) => {
|
|
35270
35465
|
const [modalContextType, setModalContextType] = useState104(null);
|
|
35271
|
-
const modalsContext =
|
|
35466
|
+
const modalsContext = useMemo155(() => {
|
|
35272
35467
|
return {
|
|
35273
35468
|
selectedModal: modalContextType,
|
|
35274
35469
|
setSelectedModal: setModalContextType
|
|
@@ -35281,7 +35476,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
35281
35476
|
};
|
|
35282
35477
|
|
|
35283
35478
|
// src/components/SetTimelineInOutProvider.tsx
|
|
35284
|
-
import { useEffect as useEffect89, useMemo as
|
|
35479
|
+
import { useEffect as useEffect89, useMemo as useMemo156, useState as useState105 } from "react";
|
|
35285
35480
|
|
|
35286
35481
|
// src/state/marks.ts
|
|
35287
35482
|
var localStorageKey5 = () => `remotion.editor.marksv2`;
|
|
@@ -35300,7 +35495,7 @@ var loadMarks = () => {
|
|
|
35300
35495
|
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
35301
35496
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
35302
35497
|
const [inAndOutFrames, setInAndOutFrames] = useState105(() => loadMarks());
|
|
35303
|
-
const setTimelineInOutContextValue =
|
|
35498
|
+
const setTimelineInOutContextValue = useMemo156(() => {
|
|
35304
35499
|
return {
|
|
35305
35500
|
setInAndOutFrames
|
|
35306
35501
|
};
|
|
@@ -35318,7 +35513,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
35318
35513
|
};
|
|
35319
35514
|
|
|
35320
35515
|
// src/components/ShowGuidesProvider.tsx
|
|
35321
|
-
import { useCallback as useCallback153, useMemo as
|
|
35516
|
+
import { useCallback as useCallback153, useMemo as useMemo157, useRef as useRef52, useState as useState106 } from "react";
|
|
35322
35517
|
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
35323
35518
|
var ShowGuidesProvider = ({ children }) => {
|
|
35324
35519
|
const [guidesList, setGuidesList] = useState106(() => loadGuidesList());
|
|
@@ -35334,7 +35529,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
35334
35529
|
return newVal;
|
|
35335
35530
|
});
|
|
35336
35531
|
}, []);
|
|
35337
|
-
const editorShowGuidesCtx =
|
|
35532
|
+
const editorShowGuidesCtx = useMemo157(() => {
|
|
35338
35533
|
return {
|
|
35339
35534
|
editorShowGuides,
|
|
35340
35535
|
setEditorShowGuides,
|
|
@@ -35361,7 +35556,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
35361
35556
|
};
|
|
35362
35557
|
|
|
35363
35558
|
// src/components/ShowRulersProvider.tsx
|
|
35364
|
-
import { useCallback as useCallback154, useMemo as
|
|
35559
|
+
import { useCallback as useCallback154, useMemo as useMemo158, useState as useState107 } from "react";
|
|
35365
35560
|
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
35366
35561
|
var ShowRulersProvider = ({ children }) => {
|
|
35367
35562
|
const [editorShowRulers, setEditorShowRulersState] = useState107(() => loadEditorShowRulersOption());
|
|
@@ -35372,7 +35567,7 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
35372
35567
|
return newVal;
|
|
35373
35568
|
});
|
|
35374
35569
|
}, []);
|
|
35375
|
-
const editorShowRulersCtx =
|
|
35570
|
+
const editorShowRulersCtx = useMemo158(() => {
|
|
35376
35571
|
return {
|
|
35377
35572
|
editorShowRulers,
|
|
35378
35573
|
setEditorShowRulers
|
|
@@ -35404,7 +35599,7 @@ var VisualControlsUndoSync = () => {
|
|
|
35404
35599
|
};
|
|
35405
35600
|
|
|
35406
35601
|
// src/components/ZoomGesturesProvider.tsx
|
|
35407
|
-
import { useCallback as useCallback155, useMemo as
|
|
35602
|
+
import { useCallback as useCallback155, useMemo as useMemo159, useState as useState108 } from "react";
|
|
35408
35603
|
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
35409
35604
|
var ZoomGesturesProvider = ({ children }) => {
|
|
35410
35605
|
const [editorZoomGestures, setEditorZoomGesturesState] = useState108(() => loadEditorZoomGesturesOption());
|
|
@@ -35415,7 +35610,7 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
35415
35610
|
return newVal;
|
|
35416
35611
|
});
|
|
35417
35612
|
}, []);
|
|
35418
|
-
const editorZoomGesturesCtx =
|
|
35613
|
+
const editorZoomGesturesCtx = useMemo159(() => {
|
|
35419
35614
|
return {
|
|
35420
35615
|
editorZoomGestures,
|
|
35421
35616
|
setEditorZoomGestures
|
|
@@ -35552,7 +35747,7 @@ var ServerDisconnected = () => {
|
|
|
35552
35747
|
};
|
|
35553
35748
|
|
|
35554
35749
|
// src/FastRefreshProvider.tsx
|
|
35555
|
-
import { useCallback as useCallback156, useEffect as useEffect91, useMemo as
|
|
35750
|
+
import { useCallback as useCallback156, useEffect as useEffect91, useMemo as useMemo160, useState as useState109 } from "react";
|
|
35556
35751
|
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
35557
35752
|
var FastRefreshProvider = ({ children }) => {
|
|
35558
35753
|
const [fastRefreshes, setFastRefreshes] = useState109(0);
|
|
@@ -35571,7 +35766,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
35571
35766
|
}
|
|
35572
35767
|
}
|
|
35573
35768
|
}, []);
|
|
35574
|
-
const value =
|
|
35769
|
+
const value = useMemo160(() => ({ fastRefreshes, manualRefreshes, increaseManualRefreshes }), [fastRefreshes, manualRefreshes, increaseManualRefreshes]);
|
|
35575
35770
|
return /* @__PURE__ */ jsx303(FastRefreshContext.Provider, {
|
|
35576
35771
|
value,
|
|
35577
35772
|
children
|
|
@@ -35746,7 +35941,7 @@ import {
|
|
|
35746
35941
|
useContext as useContext100,
|
|
35747
35942
|
useEffect as useEffect92,
|
|
35748
35943
|
useImperativeHandle as useImperativeHandle15,
|
|
35749
|
-
useMemo as
|
|
35944
|
+
useMemo as useMemo161,
|
|
35750
35945
|
useState as useState110
|
|
35751
35946
|
} from "react";
|
|
35752
35947
|
import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
|
|
@@ -35756,20 +35951,20 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35756
35951
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
|
|
35757
35952
|
const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
|
|
35758
35953
|
if (manualRefreshes) {}
|
|
35759
|
-
const selectedComposition =
|
|
35954
|
+
const selectedComposition = useMemo161(() => {
|
|
35760
35955
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
35761
35956
|
}, [canvasContent, compositions]);
|
|
35762
35957
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
35763
35958
|
const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
|
|
35764
35959
|
const env = Internals69.getRemotionEnvironment();
|
|
35765
|
-
const inputProps =
|
|
35960
|
+
const inputProps = useMemo161(() => {
|
|
35766
35961
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
35767
35962
|
}, [env.isPlayer]);
|
|
35768
35963
|
const [resolvedConfigs, setResolvedConfigs] = useState110({});
|
|
35769
|
-
const selectedEditorProps =
|
|
35964
|
+
const selectedEditorProps = useMemo161(() => {
|
|
35770
35965
|
return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
|
|
35771
35966
|
}, [allEditorProps, selectedComposition]);
|
|
35772
|
-
const renderModalProps =
|
|
35967
|
+
const renderModalProps = useMemo161(() => {
|
|
35773
35968
|
return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};
|
|
35774
35969
|
}, [allEditorProps, renderModalComposition]);
|
|
35775
35970
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -35906,13 +36101,13 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35906
36101
|
inputProps
|
|
35907
36102
|
]);
|
|
35908
36103
|
const isTheSame = selectedComposition?.id === renderModalComposition?.id;
|
|
35909
|
-
const currentDefaultProps =
|
|
36104
|
+
const currentDefaultProps = useMemo161(() => {
|
|
35910
36105
|
return {
|
|
35911
36106
|
...selectedComposition?.defaultProps ?? {},
|
|
35912
36107
|
...selectedEditorProps ?? {}
|
|
35913
36108
|
};
|
|
35914
36109
|
}, [selectedComposition?.defaultProps, selectedEditorProps]);
|
|
35915
|
-
const originalProps =
|
|
36110
|
+
const originalProps = useMemo161(() => {
|
|
35916
36111
|
return {
|
|
35917
36112
|
...currentDefaultProps,
|
|
35918
36113
|
...inputProps ?? {}
|
|
@@ -35981,7 +36176,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
35981
36176
|
renderModalComposition,
|
|
35982
36177
|
renderModalProps
|
|
35983
36178
|
]);
|
|
35984
|
-
const resolvedConfigsIncludingStaticOnes =
|
|
36179
|
+
const resolvedConfigsIncludingStaticOnes = useMemo161(() => {
|
|
35985
36180
|
const staticComps = compositions.filter((c) => {
|
|
35986
36181
|
return c.calculateMetadata === null;
|
|
35987
36182
|
});
|