@remotion/studio 4.0.409 → 4.0.411
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/api/write-static-file.js +1 -1
- package/dist/components/InstallPackage.js +27 -18
- package/dist/components/Modals.js +1 -1
- package/dist/components/RenderButton.js +43 -41
- package/dist/components/RenderModal/WebRenderModal.js +22 -18
- package/dist/components/RenderQueue/client-side-render-types.d.ts +6 -6
- package/dist/esm/{chunk-yhf0gvmn.js → chunk-t3rf3vkq.js} +243 -188
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internals.mjs +243 -188
- package/dist/esm/previewEntry.mjs +245 -190
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/retry-payload.js +16 -0
- package/dist/state/modals.d.ts +15 -0
- package/package.json +9 -9
|
@@ -10,7 +10,7 @@ import { Internals as Internals66 } from "remotion";
|
|
|
10
10
|
|
|
11
11
|
// src/components/Editor.tsx
|
|
12
12
|
import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
|
|
13
|
-
import React177, { useCallback as useCallback135, useEffect as
|
|
13
|
+
import React177, { useCallback as useCallback135, useEffect as useEffect84, useMemo as useMemo136 } from "react";
|
|
14
14
|
import { Internals as Internals62 } from "remotion";
|
|
15
15
|
|
|
16
16
|
// src/helpers/colors.ts
|
|
@@ -3246,7 +3246,7 @@ var writeStaticFile = async ({
|
|
|
3246
3246
|
if (window.remotion_isReadOnlyStudio) {
|
|
3247
3247
|
throw new Error("writeStaticFile() is not available in read-only Studio");
|
|
3248
3248
|
}
|
|
3249
|
-
const url = new URL(
|
|
3249
|
+
const url = new URL(`${window.remotion_staticBase}/api/add-asset`, window.location.origin);
|
|
3250
3250
|
if (filePath.includes("\\")) {
|
|
3251
3251
|
return Promise.reject(new Error("File path cannot contain backslashes"));
|
|
3252
3252
|
}
|
|
@@ -7525,10 +7525,10 @@ var MenuBuildIndicator = () => {
|
|
|
7525
7525
|
};
|
|
7526
7526
|
|
|
7527
7527
|
// src/components/SidebarCollapserControls.tsx
|
|
7528
|
-
import { useCallback as useCallback91, useContext as useContext59, useEffect as
|
|
7528
|
+
import { useCallback as useCallback91, useContext as useContext59, useEffect as useEffect61 } from "react";
|
|
7529
7529
|
|
|
7530
7530
|
// src/components/TopPanel.tsx
|
|
7531
|
-
import { useCallback as useCallback90, useContext as useContext58, useEffect as
|
|
7531
|
+
import { useCallback as useCallback90, useContext as useContext58, useEffect as useEffect60, useMemo as useMemo96 } from "react";
|
|
7532
7532
|
|
|
7533
7533
|
// src/helpers/use-breakpoint.ts
|
|
7534
7534
|
import { useEffect as useEffect25, useState as useState30 } from "react";
|
|
@@ -16468,7 +16468,21 @@ var makeClientRetryPayload = (job) => {
|
|
|
16468
16468
|
initialLicenseKey: job.licenseKey,
|
|
16469
16469
|
defaultProps: job.inputProps,
|
|
16470
16470
|
inFrameMark: job.type === "client-video" ? job.startFrame : null,
|
|
16471
|
-
outFrameMark: job.type === "client-video" ? job.endFrame : null
|
|
16471
|
+
outFrameMark: job.type === "client-video" ? job.endFrame : null,
|
|
16472
|
+
initialDefaultOutName: job.outName,
|
|
16473
|
+
initialScale: job.scale,
|
|
16474
|
+
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
16475
|
+
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
16476
|
+
initialAudioBitrate: job.type === "client-video" ? job.audioBitrate : null,
|
|
16477
|
+
initialAudioCodec: job.type === "client-video" ? job.audioCodec : null,
|
|
16478
|
+
initialContainer: job.type === "client-video" ? job.container : null,
|
|
16479
|
+
initialHardwareAcceleration: job.type === "client-video" ? job.hardwareAcceleration : null,
|
|
16480
|
+
initialVideoBitrate: job.type === "client-video" ? job.videoBitrate : null,
|
|
16481
|
+
initialVideoCodec: job.type === "client-video" ? job.videoCodec : null,
|
|
16482
|
+
initialStillImageFormat: job.type === "client-still" ? job.imageFormat : "png",
|
|
16483
|
+
initialKeyframeIntervalInSeconds: job.type === "client-video" ? job.keyframeIntervalInSeconds : null,
|
|
16484
|
+
initialMuted: job.type === "client-video" ? job.muted : null,
|
|
16485
|
+
initialTransparent: job.type === "client-video" ? job.transparent : null
|
|
16472
16486
|
};
|
|
16473
16487
|
};
|
|
16474
16488
|
|
|
@@ -17309,7 +17323,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
17309
17323
|
};
|
|
17310
17324
|
|
|
17311
17325
|
// src/components/PreviewToolbar.tsx
|
|
17312
|
-
import { useContext as useContext55, useEffect as
|
|
17326
|
+
import { useContext as useContext55, useEffect as useEffect58, useRef as useRef32, useState as useState60 } from "react";
|
|
17313
17327
|
import { Internals as Internals45 } from "remotion";
|
|
17314
17328
|
|
|
17315
17329
|
// src/helpers/should-show-render-button.ts
|
|
@@ -18126,14 +18140,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
|
|
|
18126
18140
|
|
|
18127
18141
|
// src/components/RenderButton.tsx
|
|
18128
18142
|
import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
|
|
18129
|
-
import {
|
|
18130
|
-
useCallback as useCallback88,
|
|
18131
|
-
useContext as useContext53,
|
|
18132
|
-
useEffect as useEffect58,
|
|
18133
|
-
useMemo as useMemo93,
|
|
18134
|
-
useRef as useRef31,
|
|
18135
|
-
useState as useState59
|
|
18136
|
-
} from "react";
|
|
18143
|
+
import { useCallback as useCallback88, useContext as useContext53, useMemo as useMemo93, useRef as useRef31, useState as useState59 } from "react";
|
|
18137
18144
|
import ReactDOM8 from "react-dom";
|
|
18138
18145
|
import { Internals as Internals43 } from "remotion";
|
|
18139
18146
|
import { jsx as jsx174, jsxs as jsxs81, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
@@ -18215,6 +18222,34 @@ var RenderButton = ({
|
|
|
18215
18222
|
shouldApplyCssTransforms: true
|
|
18216
18223
|
});
|
|
18217
18224
|
const refresh = size4?.refresh;
|
|
18225
|
+
const onPointerDown = useCallback88(() => {
|
|
18226
|
+
setDropdownOpened((o) => {
|
|
18227
|
+
if (!o) {
|
|
18228
|
+
refresh?.();
|
|
18229
|
+
}
|
|
18230
|
+
return !o;
|
|
18231
|
+
});
|
|
18232
|
+
}, [refresh]);
|
|
18233
|
+
const onClickDropdown = useCallback88((e) => {
|
|
18234
|
+
e.stopPropagation();
|
|
18235
|
+
const isKeyboardInitiated = e.detail === 0;
|
|
18236
|
+
if (!isKeyboardInitiated) {
|
|
18237
|
+
return;
|
|
18238
|
+
}
|
|
18239
|
+
setDropdownOpened((o) => {
|
|
18240
|
+
if (!o) {
|
|
18241
|
+
refresh?.();
|
|
18242
|
+
window.addEventListener("pointerup", (evt) => {
|
|
18243
|
+
if (!isMenuItem(evt.target)) {
|
|
18244
|
+
setDropdownOpened(false);
|
|
18245
|
+
}
|
|
18246
|
+
}, {
|
|
18247
|
+
once: true
|
|
18248
|
+
});
|
|
18249
|
+
}
|
|
18250
|
+
return !o;
|
|
18251
|
+
});
|
|
18252
|
+
}, [refresh]);
|
|
18218
18253
|
const connectionStatus = useContext53(StudioServerConnectionCtx).previewServerState.type;
|
|
18219
18254
|
const shortcut = areKeyboardShortcutsDisabled() ? "" : "(R)";
|
|
18220
18255
|
const tooltip = connectionStatus === "connected" ? "Export the current composition " + shortcut : "Connect to the Studio server to render";
|
|
@@ -18304,7 +18339,21 @@ var RenderButton = ({
|
|
|
18304
18339
|
inFrameMark: inFrame,
|
|
18305
18340
|
outFrameMark: outFrame,
|
|
18306
18341
|
initialLogLevel: defaults.logLevel,
|
|
18307
|
-
initialLicenseKey: defaults.publicLicenseKey
|
|
18342
|
+
initialLicenseKey: defaults.publicLicenseKey,
|
|
18343
|
+
initialStillImageFormat: defaults.stillImageFormat,
|
|
18344
|
+
initialScale: defaults.scale,
|
|
18345
|
+
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
18346
|
+
initialDefaultOutName: null,
|
|
18347
|
+
initialContainer: null,
|
|
18348
|
+
initialVideoCodec: null,
|
|
18349
|
+
initialAudioCodec: null,
|
|
18350
|
+
initialAudioBitrate: null,
|
|
18351
|
+
initialVideoBitrate: null,
|
|
18352
|
+
initialHardwareAcceleration: null,
|
|
18353
|
+
initialKeyframeIntervalInSeconds: null,
|
|
18354
|
+
initialTransparent: null,
|
|
18355
|
+
initialMuted: null,
|
|
18356
|
+
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
|
|
18308
18357
|
});
|
|
18309
18358
|
}, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
|
|
18310
18359
|
const onClick = useCallback88(() => {
|
|
@@ -18355,46 +18404,6 @@ var RenderButton = ({
|
|
|
18355
18404
|
}
|
|
18356
18405
|
];
|
|
18357
18406
|
}, [handleRenderTypeChange]);
|
|
18358
|
-
useEffect58(() => {
|
|
18359
|
-
const { current } = dropdownRef;
|
|
18360
|
-
if (!current) {
|
|
18361
|
-
return;
|
|
18362
|
-
}
|
|
18363
|
-
const onPointerDown = () => {
|
|
18364
|
-
return setDropdownOpened((o) => {
|
|
18365
|
-
if (!o) {
|
|
18366
|
-
refresh?.();
|
|
18367
|
-
}
|
|
18368
|
-
return !o;
|
|
18369
|
-
});
|
|
18370
|
-
};
|
|
18371
|
-
const onClickDropdown = (e) => {
|
|
18372
|
-
e.stopPropagation();
|
|
18373
|
-
const isKeyboardInitiated = e.detail === 0;
|
|
18374
|
-
if (!isKeyboardInitiated) {
|
|
18375
|
-
return;
|
|
18376
|
-
}
|
|
18377
|
-
return setDropdownOpened((o) => {
|
|
18378
|
-
if (!o) {
|
|
18379
|
-
refresh?.();
|
|
18380
|
-
window.addEventListener("pointerup", (evt) => {
|
|
18381
|
-
if (!isMenuItem(evt.target)) {
|
|
18382
|
-
setDropdownOpened(false);
|
|
18383
|
-
}
|
|
18384
|
-
}, {
|
|
18385
|
-
once: true
|
|
18386
|
-
});
|
|
18387
|
-
}
|
|
18388
|
-
return !o;
|
|
18389
|
-
});
|
|
18390
|
-
};
|
|
18391
|
-
current.addEventListener("pointerdown", onPointerDown);
|
|
18392
|
-
current.addEventListener("click", onClickDropdown);
|
|
18393
|
-
return () => {
|
|
18394
|
-
current.removeEventListener("pointerdown", onPointerDown);
|
|
18395
|
-
current.removeEventListener("click", onClickDropdown);
|
|
18396
|
-
};
|
|
18397
|
-
}, [refresh]);
|
|
18398
18407
|
const spaceToBottom = useMemo93(() => {
|
|
18399
18408
|
const margin2 = 10;
|
|
18400
18409
|
if (size4 && dropdownOpened) {
|
|
@@ -18462,7 +18471,6 @@ var RenderButton = ({
|
|
|
18462
18471
|
/* @__PURE__ */ jsx174("button", {
|
|
18463
18472
|
style: { display: "none" },
|
|
18464
18473
|
id: "render-modal-button-client",
|
|
18465
|
-
disabled: connectionStatus !== "connected" && renderType === "server-render",
|
|
18466
18474
|
onClick: openClientRenderModal,
|
|
18467
18475
|
type: "button"
|
|
18468
18476
|
}),
|
|
@@ -18506,6 +18514,8 @@ var RenderButton = ({
|
|
|
18506
18514
|
style: dropdownTriggerStyle,
|
|
18507
18515
|
disabled: connectionStatus !== "connected",
|
|
18508
18516
|
className: MENU_INITIATOR_CLASSNAME,
|
|
18517
|
+
onPointerDown,
|
|
18518
|
+
onClick: onClickDropdown,
|
|
18509
18519
|
children: /* @__PURE__ */ jsx174(CaretDown, {})
|
|
18510
18520
|
})
|
|
18511
18521
|
]
|
|
@@ -18708,7 +18718,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
18708
18718
|
const [loop, setLoop] = useState60(loadLoopOption());
|
|
18709
18719
|
const isFullscreenSupported = checkFullscreenSupport();
|
|
18710
18720
|
const isMobileLayout = useMobileLayout();
|
|
18711
|
-
|
|
18721
|
+
useEffect58(() => {
|
|
18712
18722
|
if (isMobileLayout && previewToolbarRef.current) {
|
|
18713
18723
|
const updateScrollableIndicatorProps = (target) => {
|
|
18714
18724
|
const boundingBox = target.getBoundingClientRect();
|
|
@@ -18988,7 +18998,7 @@ var SplitterElement = ({ children, type, sticky }) => {
|
|
|
18988
18998
|
|
|
18989
18999
|
// src/components/Splitter/SplitterHandle.tsx
|
|
18990
19000
|
import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
|
|
18991
|
-
import { useContext as useContext57, useEffect as
|
|
19001
|
+
import { useContext as useContext57, useEffect as useEffect59, useRef as useRef34, useState as useState62 } from "react";
|
|
18992
19002
|
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
18993
19003
|
var SPLITTER_HANDLE_SIZE = 3;
|
|
18994
19004
|
var containerRow2 = {
|
|
@@ -19004,7 +19014,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
|
|
|
19004
19014
|
}
|
|
19005
19015
|
const [lastPointerUp, setLastPointerUp] = useState62(() => Date.now());
|
|
19006
19016
|
const ref = useRef34(null);
|
|
19007
|
-
|
|
19017
|
+
useEffect59(() => {
|
|
19008
19018
|
if (context.isDragging.current) {
|
|
19009
19019
|
return;
|
|
19010
19020
|
}
|
|
@@ -19087,7 +19097,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
|
|
|
19087
19097
|
}
|
|
19088
19098
|
};
|
|
19089
19099
|
}, [allowToCollapse, context, context.flexValue, lastPointerUp, onCollapse]);
|
|
19090
|
-
|
|
19100
|
+
useEffect59(() => {
|
|
19091
19101
|
const { current } = ref;
|
|
19092
19102
|
if (!current) {
|
|
19093
19103
|
return;
|
|
@@ -19174,7 +19184,7 @@ var TopPanel = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelay
|
|
|
19174
19184
|
}
|
|
19175
19185
|
return "expanded";
|
|
19176
19186
|
}, [sidebarCollapsedStateRight]);
|
|
19177
|
-
|
|
19187
|
+
useEffect60(() => {
|
|
19178
19188
|
onMounted();
|
|
19179
19189
|
}, [onMounted]);
|
|
19180
19190
|
const canvasContainerStyle = useMemo96(() => ({
|
|
@@ -19344,7 +19354,7 @@ var SidebarCollapserControls = () => {
|
|
|
19344
19354
|
toggleLeft,
|
|
19345
19355
|
toggleRight
|
|
19346
19356
|
]);
|
|
19347
|
-
|
|
19357
|
+
useEffect61(() => {
|
|
19348
19358
|
const left3 = keybindings.registerKeybinding({
|
|
19349
19359
|
event: "keydown",
|
|
19350
19360
|
key: "b",
|
|
@@ -19422,7 +19432,7 @@ var SidebarCollapserControls = () => {
|
|
|
19422
19432
|
import {
|
|
19423
19433
|
useCallback as useCallback92,
|
|
19424
19434
|
useContext as useContext60,
|
|
19425
|
-
useEffect as
|
|
19435
|
+
useEffect as useEffect62,
|
|
19426
19436
|
useMemo as useMemo97,
|
|
19427
19437
|
useState as useState63
|
|
19428
19438
|
} from "react";
|
|
@@ -19474,7 +19484,7 @@ var UpdateCheck = () => {
|
|
|
19474
19484
|
});
|
|
19475
19485
|
return controller;
|
|
19476
19486
|
}, []);
|
|
19477
|
-
|
|
19487
|
+
useEffect62(() => {
|
|
19478
19488
|
const abortUpdate = checkForUpdates();
|
|
19479
19489
|
const abortBugs = checkForBugs();
|
|
19480
19490
|
return () => {
|
|
@@ -19839,7 +19849,7 @@ import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
|
|
|
19839
19849
|
import {
|
|
19840
19850
|
useCallback as useCallback94,
|
|
19841
19851
|
useContext as useContext63,
|
|
19842
|
-
useEffect as
|
|
19852
|
+
useEffect as useEffect63,
|
|
19843
19853
|
useMemo as useMemo100,
|
|
19844
19854
|
useRef as useRef35,
|
|
19845
19855
|
useState as useState65
|
|
@@ -20270,7 +20280,7 @@ var Inner2 = () => {
|
|
|
20270
20280
|
videoConfig,
|
|
20271
20281
|
width
|
|
20272
20282
|
]);
|
|
20273
|
-
|
|
20283
|
+
useEffect63(() => {
|
|
20274
20284
|
if (!dragging.dragging) {
|
|
20275
20285
|
return;
|
|
20276
20286
|
}
|
|
@@ -20281,7 +20291,7 @@ var Inner2 = () => {
|
|
|
20281
20291
|
window.removeEventListener("pointerup", onPointerUpScrubbing);
|
|
20282
20292
|
};
|
|
20283
20293
|
}, [dragging.dragging, onPointerMoveScrubbing, onPointerUpScrubbing]);
|
|
20284
|
-
|
|
20294
|
+
useEffect63(() => {
|
|
20285
20295
|
if (inOutDragging.dragging === false) {
|
|
20286
20296
|
return;
|
|
20287
20297
|
}
|
|
@@ -20457,7 +20467,7 @@ import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
|
|
|
20457
20467
|
import {
|
|
20458
20468
|
useCallback as useCallback96,
|
|
20459
20469
|
useContext as useContext64,
|
|
20460
|
-
useEffect as
|
|
20470
|
+
useEffect as useEffect64,
|
|
20461
20471
|
useMemo as useMemo101,
|
|
20462
20472
|
useState as useState66
|
|
20463
20473
|
} from "react";
|
|
@@ -20546,7 +20556,7 @@ var TimelineStack = ({ isCompact, sequence }) => {
|
|
|
20546
20556
|
window.open(getGitRefUrl(window.remotion_gitSource, originalLocation), "_blank");
|
|
20547
20557
|
}
|
|
20548
20558
|
}, [canOpenInEditor, canOpenInGitHub, openEditor, originalLocation]);
|
|
20549
|
-
|
|
20559
|
+
useEffect64(() => {
|
|
20550
20560
|
if (!sequence.stack) {
|
|
20551
20561
|
return;
|
|
20552
20562
|
}
|
|
@@ -20694,14 +20704,14 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
|
|
|
20694
20704
|
};
|
|
20695
20705
|
|
|
20696
20706
|
// src/components/Timeline/TimelineTimeIndicators.tsx
|
|
20697
|
-
import { useContext as useContext66, useEffect as
|
|
20707
|
+
import { useContext as useContext66, useEffect as useEffect66, useMemo as useMemo103, useRef as useRef37 } from "react";
|
|
20698
20708
|
import { Internals as Internals50 } from "remotion";
|
|
20699
20709
|
|
|
20700
20710
|
// src/components/TimeValue.tsx
|
|
20701
20711
|
import { PlayerInternals as PlayerInternals17 } from "@remotion/player";
|
|
20702
20712
|
import {
|
|
20703
20713
|
useCallback as useCallback98,
|
|
20704
|
-
useEffect as
|
|
20714
|
+
useEffect as useEffect65,
|
|
20705
20715
|
useImperativeHandle as useImperativeHandle13,
|
|
20706
20716
|
useRef as useRef36
|
|
20707
20717
|
} from "react";
|
|
@@ -20754,7 +20764,7 @@ var TimeValue = () => {
|
|
|
20754
20764
|
pause,
|
|
20755
20765
|
toggle
|
|
20756
20766
|
}), [seek, play, pause, toggle]);
|
|
20757
|
-
|
|
20767
|
+
useEffect65(() => {
|
|
20758
20768
|
const gKey = keybindings.registerKeybinding({
|
|
20759
20769
|
event: "keypress",
|
|
20760
20770
|
key: "g",
|
|
@@ -20867,7 +20877,7 @@ var TimelineTimeIndicators = () => {
|
|
|
20867
20877
|
};
|
|
20868
20878
|
var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
|
|
20869
20879
|
const ref = useRef37(null);
|
|
20870
|
-
|
|
20880
|
+
useEffect66(() => {
|
|
20871
20881
|
const currentRef = ref.current;
|
|
20872
20882
|
if (!currentRef) {
|
|
20873
20883
|
return;
|
|
@@ -20974,7 +20984,7 @@ var TimelineList = ({ timeline }) => {
|
|
|
20974
20984
|
};
|
|
20975
20985
|
|
|
20976
20986
|
// src/components/Timeline/TimelinePlayCursorSyncer.tsx
|
|
20977
|
-
import { useContext as useContext67, useEffect as
|
|
20987
|
+
import { useContext as useContext67, useEffect as useEffect67 } from "react";
|
|
20978
20988
|
import { Internals as Internals51 } from "remotion";
|
|
20979
20989
|
var lastTimelinePositionWhileScrolling = null;
|
|
20980
20990
|
var TimelinePlayCursorSyncer = () => {
|
|
@@ -20992,7 +21002,7 @@ var TimelinePlayCursorSyncer = () => {
|
|
|
20992
21002
|
setCurrentFps(video.fps);
|
|
20993
21003
|
}
|
|
20994
21004
|
const playing = timelineContext.playing ?? false;
|
|
20995
|
-
|
|
21005
|
+
useEffect67(() => {
|
|
20996
21006
|
if (!video) {
|
|
20997
21007
|
return;
|
|
20998
21008
|
}
|
|
@@ -21005,7 +21015,7 @@ var TimelinePlayCursorSyncer = () => {
|
|
|
21005
21015
|
frame: timelinePosition
|
|
21006
21016
|
});
|
|
21007
21017
|
}, [playing, timelineContext, timelinePosition, video]);
|
|
21008
|
-
|
|
21018
|
+
useEffect67(() => {
|
|
21009
21019
|
const { current } = scrollableRef;
|
|
21010
21020
|
if (!current) {
|
|
21011
21021
|
return;
|
|
@@ -36008,7 +36018,7 @@ var readAscii = (slice, length) => {
|
|
|
36008
36018
|
*/
|
|
36009
36019
|
|
|
36010
36020
|
// src/helpers/use-max-media-duration.ts
|
|
36011
|
-
import { useEffect as
|
|
36021
|
+
import { useEffect as useEffect68, useState as useState67 } from "react";
|
|
36012
36022
|
var cache = new Map;
|
|
36013
36023
|
var getSrc = (s) => {
|
|
36014
36024
|
if (s.type === "video") {
|
|
@@ -36022,7 +36032,7 @@ var getSrc = (s) => {
|
|
|
36022
36032
|
var useMaxMediaDuration = (s, fps) => {
|
|
36023
36033
|
const src = getSrc(s);
|
|
36024
36034
|
const [maxMediaDuration, setMaxMediaDuration] = useState67(src ? cache.get(src) ?? null : Infinity);
|
|
36025
|
-
|
|
36035
|
+
useEffect68(() => {
|
|
36026
36036
|
if (!src) {
|
|
36027
36037
|
return;
|
|
36028
36038
|
}
|
|
@@ -36052,7 +36062,7 @@ var useMaxMediaDuration = (s, fps) => {
|
|
|
36052
36062
|
|
|
36053
36063
|
// src/components/AudioWaveform.tsx
|
|
36054
36064
|
import { getAudioData, getWaveformPortion } from "@remotion/media-utils";
|
|
36055
|
-
import { useEffect as
|
|
36065
|
+
import { useEffect as useEffect69, useMemo as useMemo106, useRef as useRef39, useState as useState68 } from "react";
|
|
36056
36066
|
import { Internals as Internals52 } from "remotion";
|
|
36057
36067
|
|
|
36058
36068
|
// src/components/AudioWaveformBar.tsx
|
|
@@ -36117,14 +36127,14 @@ var AudioWaveform = ({
|
|
|
36117
36127
|
throw new Error("Expected video config");
|
|
36118
36128
|
}
|
|
36119
36129
|
const canvas = useRef39(null);
|
|
36120
|
-
|
|
36130
|
+
useEffect69(() => {
|
|
36121
36131
|
const { current } = mountState;
|
|
36122
36132
|
current.isMounted = true;
|
|
36123
36133
|
return () => {
|
|
36124
36134
|
current.isMounted = false;
|
|
36125
36135
|
};
|
|
36126
36136
|
}, []);
|
|
36127
|
-
|
|
36137
|
+
useEffect69(() => {
|
|
36128
36138
|
if (!canvas.current) {
|
|
36129
36139
|
return;
|
|
36130
36140
|
}
|
|
@@ -36151,7 +36161,7 @@ var AudioWaveform = ({
|
|
|
36151
36161
|
context.strokeStyle = LIGHT_TRANSPARENT;
|
|
36152
36162
|
context.stroke();
|
|
36153
36163
|
}, [visualizationWidth, metadata, startFrom, volume, doesVolumeChange]);
|
|
36154
|
-
|
|
36164
|
+
useEffect69(() => {
|
|
36155
36165
|
setError(null);
|
|
36156
36166
|
getAudioData(src).then((data) => {
|
|
36157
36167
|
if (mountState.current.isMounted) {
|
|
@@ -36326,7 +36336,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
|
|
|
36326
36336
|
};
|
|
36327
36337
|
|
|
36328
36338
|
// src/components/Timeline/TimelineVideoInfo.tsx
|
|
36329
|
-
import { useEffect as
|
|
36339
|
+
import { useEffect as useEffect70, useRef as useRef40, useState as useState69 } from "react";
|
|
36330
36340
|
import { useVideoConfig as useVideoConfig5 } from "remotion";
|
|
36331
36341
|
|
|
36332
36342
|
// src/helpers/extract-frames.ts
|
|
@@ -36644,12 +36654,12 @@ var TimelineVideoInfo = ({ src, visualizationWidth, startFrom, durationInFrames
|
|
|
36644
36654
|
const ref = useRef40(null);
|
|
36645
36655
|
const [error, setError] = useState69(null);
|
|
36646
36656
|
const aspectRatio = useRef40(getAspectRatioFromCache(src));
|
|
36647
|
-
|
|
36657
|
+
useEffect70(() => {
|
|
36648
36658
|
return () => {
|
|
36649
36659
|
clearFramesForSrc(src);
|
|
36650
36660
|
};
|
|
36651
36661
|
}, [src]);
|
|
36652
|
-
|
|
36662
|
+
useEffect70(() => {
|
|
36653
36663
|
if (error) {
|
|
36654
36664
|
return;
|
|
36655
36665
|
}
|
|
@@ -37102,13 +37112,13 @@ var EditorContent = ({ readOnlyStudio, children }) => {
|
|
|
37102
37112
|
};
|
|
37103
37113
|
|
|
37104
37114
|
// src/components/GlobalKeybindings.tsx
|
|
37105
|
-
import { useContext as useContext71, useEffect as
|
|
37115
|
+
import { useContext as useContext71, useEffect as useEffect71 } from "react";
|
|
37106
37116
|
var GlobalKeybindings = () => {
|
|
37107
37117
|
const keybindings = useKeybinding();
|
|
37108
37118
|
const { setSelectedModal } = useContext71(ModalsContext);
|
|
37109
37119
|
const { setCheckerboard } = useContext71(CheckerboardContext);
|
|
37110
37120
|
const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
|
|
37111
|
-
|
|
37121
|
+
useEffect71(() => {
|
|
37112
37122
|
const nKey = keybindings.registerKeybinding({
|
|
37113
37123
|
event: "keypress",
|
|
37114
37124
|
key: "n",
|
|
@@ -37213,8 +37223,13 @@ var GlobalKeybindings = () => {
|
|
|
37213
37223
|
import { useContext as useContext85 } from "react";
|
|
37214
37224
|
|
|
37215
37225
|
// src/components/InstallPackage.tsx
|
|
37216
|
-
import {
|
|
37217
|
-
|
|
37226
|
+
import {
|
|
37227
|
+
apiDocs,
|
|
37228
|
+
descriptions,
|
|
37229
|
+
extraPackages,
|
|
37230
|
+
installableMap
|
|
37231
|
+
} from "@remotion/studio-shared";
|
|
37232
|
+
import React144, { useCallback as useCallback100, useContext as useContext73, useEffect as useEffect72 } from "react";
|
|
37218
37233
|
import { VERSION as VERSION2 } from "remotion";
|
|
37219
37234
|
|
|
37220
37235
|
// src/api/install-package.ts
|
|
@@ -37348,7 +37363,7 @@ var InstallPackageModal = ({ packageManager }) => {
|
|
|
37348
37363
|
const canSelectPackages = state.type === "idle" && ctx.type === "connected";
|
|
37349
37364
|
const disabled = !(canSelectPackages || state.type === "done") || selectedPackages.length === 0;
|
|
37350
37365
|
const { registerKeybinding } = useKeybinding();
|
|
37351
|
-
|
|
37366
|
+
useEffect72(() => {
|
|
37352
37367
|
if (disabled) {
|
|
37353
37368
|
return;
|
|
37354
37369
|
}
|
|
@@ -37393,42 +37408,72 @@ var InstallPackageModal = ({ packageManager }) => {
|
|
|
37393
37408
|
selectedPackages.length === 1 ? "" : "s",
|
|
37394
37409
|
". Check your terminal for progress."
|
|
37395
37410
|
]
|
|
37396
|
-
}) : /* @__PURE__ */
|
|
37411
|
+
}) : /* @__PURE__ */ jsxs103("div", {
|
|
37397
37412
|
style: text2,
|
|
37398
|
-
children:
|
|
37399
|
-
|
|
37400
|
-
|
|
37401
|
-
|
|
37402
|
-
|
|
37403
|
-
|
|
37404
|
-
|
|
37405
|
-
|
|
37406
|
-
|
|
37407
|
-
|
|
37408
|
-
|
|
37409
|
-
|
|
37410
|
-
|
|
37411
|
-
|
|
37412
|
-
|
|
37413
|
-
|
|
37414
|
-
|
|
37415
|
-
|
|
37416
|
-
|
|
37417
|
-
|
|
37418
|
-
|
|
37419
|
-
|
|
37420
|
-
|
|
37421
|
-
|
|
37422
|
-
|
|
37423
|
-
|
|
37424
|
-
|
|
37425
|
-
|
|
37426
|
-
|
|
37427
|
-
|
|
37428
|
-
|
|
37429
|
-
|
|
37430
|
-
|
|
37431
|
-
|
|
37413
|
+
children: [
|
|
37414
|
+
Object.entries(installableMap).filter(([, install]) => install).map(([pkgShort]) => {
|
|
37415
|
+
const pkg = pkgShort === "core" ? "remotion" : `@remotion/${pkgShort}`;
|
|
37416
|
+
const isInstalled = window.remotion_installedPackages?.includes(pkg) ?? false;
|
|
37417
|
+
const link = apiDocs[pkgShort];
|
|
37418
|
+
const description = descriptions[pkgShort];
|
|
37419
|
+
if (!link) {
|
|
37420
|
+
throw new Error("No link for " + pkg);
|
|
37421
|
+
}
|
|
37422
|
+
if (!description) {
|
|
37423
|
+
throw new Error("No description for " + pkg);
|
|
37424
|
+
}
|
|
37425
|
+
return /* @__PURE__ */ jsxs103(Row, {
|
|
37426
|
+
align: "center",
|
|
37427
|
+
children: [
|
|
37428
|
+
/* @__PURE__ */ jsx209(Checkbox, {
|
|
37429
|
+
checked: map[pkg],
|
|
37430
|
+
name: pkg,
|
|
37431
|
+
onChange: () => {
|
|
37432
|
+
setMap((prev) => ({ ...prev, [pkg]: !prev[pkg] }));
|
|
37433
|
+
},
|
|
37434
|
+
disabled: !canSelectPackages || isInstalled
|
|
37435
|
+
}),
|
|
37436
|
+
/* @__PURE__ */ jsx209(Spacing, {
|
|
37437
|
+
x: 1.5
|
|
37438
|
+
}),
|
|
37439
|
+
/* @__PURE__ */ jsx209(InstallablePackageComp, {
|
|
37440
|
+
description,
|
|
37441
|
+
isInstalled,
|
|
37442
|
+
link,
|
|
37443
|
+
pkg
|
|
37444
|
+
})
|
|
37445
|
+
]
|
|
37446
|
+
}, pkg);
|
|
37447
|
+
}),
|
|
37448
|
+
extraPackages.map((extraPkg) => {
|
|
37449
|
+
const isInstalled = window.remotion_installedPackages?.includes(extraPkg.name) ?? false;
|
|
37450
|
+
return /* @__PURE__ */ jsxs103(Row, {
|
|
37451
|
+
align: "center",
|
|
37452
|
+
children: [
|
|
37453
|
+
/* @__PURE__ */ jsx209(Checkbox, {
|
|
37454
|
+
checked: map[extraPkg.name],
|
|
37455
|
+
name: extraPkg.name,
|
|
37456
|
+
onChange: () => {
|
|
37457
|
+
setMap((prev) => ({
|
|
37458
|
+
...prev,
|
|
37459
|
+
[extraPkg.name]: !prev[extraPkg.name]
|
|
37460
|
+
}));
|
|
37461
|
+
},
|
|
37462
|
+
disabled: !canSelectPackages || isInstalled
|
|
37463
|
+
}),
|
|
37464
|
+
/* @__PURE__ */ jsx209(Spacing, {
|
|
37465
|
+
x: 1.5
|
|
37466
|
+
}),
|
|
37467
|
+
/* @__PURE__ */ jsx209(InstallablePackageComp, {
|
|
37468
|
+
description: extraPkg.description,
|
|
37469
|
+
isInstalled,
|
|
37470
|
+
link: extraPkg.docsUrl,
|
|
37471
|
+
pkg: `${extraPkg.name}@${extraPkg.version}`
|
|
37472
|
+
})
|
|
37473
|
+
]
|
|
37474
|
+
}, extraPkg.name);
|
|
37475
|
+
})
|
|
37476
|
+
]
|
|
37432
37477
|
})
|
|
37433
37478
|
}),
|
|
37434
37479
|
/* @__PURE__ */ jsx209(ModalFooterContainer, {
|
|
@@ -37472,7 +37517,7 @@ var InstallPackageModal = ({ packageManager }) => {
|
|
|
37472
37517
|
import { useCallback as useCallback102, useContext as useContext76, useMemo as useMemo112 } from "react";
|
|
37473
37518
|
|
|
37474
37519
|
// src/components/RenderModal/ResolveCompositionBeforeModal.tsx
|
|
37475
|
-
import React145, { useContext as useContext74, useEffect as
|
|
37520
|
+
import React145, { useContext as useContext74, useEffect as useEffect73, useMemo as useMemo111 } from "react";
|
|
37476
37521
|
import { Internals as Internals56 } from "remotion";
|
|
37477
37522
|
import { jsx as jsx210, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
37478
37523
|
var loaderContainer2 = {
|
|
@@ -37496,7 +37541,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
|
37496
37541
|
const resolved = Internals56.useResolvedVideoConfig(compositionId);
|
|
37497
37542
|
const unresolvedContext = useContext74(Internals56.CompositionManager);
|
|
37498
37543
|
const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
|
|
37499
|
-
|
|
37544
|
+
useEffect73(() => {
|
|
37500
37545
|
const { current } = Internals56.resolveCompositionsRef;
|
|
37501
37546
|
if (!current) {
|
|
37502
37547
|
throw new Error("No ref to trigger composition calc");
|
|
@@ -37554,7 +37599,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
|
37554
37599
|
};
|
|
37555
37600
|
|
|
37556
37601
|
// src/components/NewComposition/CodemodFooter.tsx
|
|
37557
|
-
import { useCallback as useCallback101, useContext as useContext75, useEffect as
|
|
37602
|
+
import { useCallback as useCallback101, useContext as useContext75, useEffect as useEffect74, useState as useState70 } from "react";
|
|
37558
37603
|
|
|
37559
37604
|
// src/components/NewComposition/DiffPreview.tsx
|
|
37560
37605
|
import { jsx as jsx211, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
@@ -37619,7 +37664,7 @@ var CodemodFooter = ({
|
|
|
37619
37664
|
type: "loading"
|
|
37620
37665
|
});
|
|
37621
37666
|
const [projectInfo, setProjectInfo] = useState70(null);
|
|
37622
|
-
|
|
37667
|
+
useEffect74(() => {
|
|
37623
37668
|
const controller = new AbortController;
|
|
37624
37669
|
getProjectInfo(controller.signal).then((info) => {
|
|
37625
37670
|
setProjectInfo(info.projectInfo);
|
|
@@ -37665,7 +37710,7 @@ var CodemodFooter = ({
|
|
|
37665
37710
|
});
|
|
37666
37711
|
}
|
|
37667
37712
|
}, [codemod]);
|
|
37668
|
-
|
|
37713
|
+
useEffect74(() => {
|
|
37669
37714
|
const abortController = new AbortController;
|
|
37670
37715
|
let aborted = false;
|
|
37671
37716
|
getCanApplyCodemod(abortController.signal).then(() => {
|
|
@@ -37683,7 +37728,7 @@ var CodemodFooter = ({
|
|
|
37683
37728
|
}, [codemodStatus, getCanApplyCodemod, setSelectedModal]);
|
|
37684
37729
|
const disabled = !valid || submitting || projectInfo === null || codemodStatus.type !== "success";
|
|
37685
37730
|
const { registerKeybinding } = useKeybinding();
|
|
37686
|
-
|
|
37731
|
+
useEffect74(() => {
|
|
37687
37732
|
if (disabled) {
|
|
37688
37733
|
return;
|
|
37689
37734
|
}
|
|
@@ -38505,7 +38550,7 @@ var OverrideInputPropsModal = () => {
|
|
|
38505
38550
|
import {
|
|
38506
38551
|
useCallback as useCallback107,
|
|
38507
38552
|
useContext as useContext80,
|
|
38508
|
-
useEffect as
|
|
38553
|
+
useEffect as useEffect76,
|
|
38509
38554
|
useMemo as useMemo117,
|
|
38510
38555
|
useRef as useRef42,
|
|
38511
38556
|
useState as useState75
|
|
@@ -39305,7 +39350,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
|
|
|
39305
39350
|
};
|
|
39306
39351
|
|
|
39307
39352
|
// src/components/QuickSwitcher/QuickSwitcherResult.tsx
|
|
39308
|
-
import { useEffect as
|
|
39353
|
+
import { useEffect as useEffect75, useMemo as useMemo116, useRef as useRef41, useState as useState74 } from "react";
|
|
39309
39354
|
import { jsx as jsx221, jsxs as jsxs114, Fragment as Fragment35 } from "react/jsx-runtime";
|
|
39310
39355
|
var container49 = {
|
|
39311
39356
|
paddingLeft: 16,
|
|
@@ -39337,7 +39382,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
39337
39382
|
const [hovered, setIsHovered] = useState74(false);
|
|
39338
39383
|
const ref = useRef41(null);
|
|
39339
39384
|
const keybindings = useKeybinding();
|
|
39340
|
-
|
|
39385
|
+
useEffect75(() => {
|
|
39341
39386
|
const { current } = ref;
|
|
39342
39387
|
if (!current) {
|
|
39343
39388
|
return;
|
|
@@ -39351,7 +39396,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
39351
39396
|
current.removeEventListener("mouseleave", onMouseLeave);
|
|
39352
39397
|
};
|
|
39353
39398
|
}, []);
|
|
39354
|
-
|
|
39399
|
+
useEffect75(() => {
|
|
39355
39400
|
if (!selected) {
|
|
39356
39401
|
return;
|
|
39357
39402
|
}
|
|
@@ -39368,7 +39413,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
39368
39413
|
binding.unregister();
|
|
39369
39414
|
};
|
|
39370
39415
|
}, [keybindings, result.onSelected, selected]);
|
|
39371
|
-
|
|
39416
|
+
useEffect75(() => {
|
|
39372
39417
|
if (selected) {
|
|
39373
39418
|
ref.current?.scrollIntoView({
|
|
39374
39419
|
block: "nearest",
|
|
@@ -39582,7 +39627,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
39582
39627
|
selectedIndex: 0
|
|
39583
39628
|
};
|
|
39584
39629
|
});
|
|
39585
|
-
|
|
39630
|
+
useEffect76(() => {
|
|
39586
39631
|
setState({
|
|
39587
39632
|
query: mapModeToQuery(initialMode),
|
|
39588
39633
|
selectedIndex: 0
|
|
@@ -39656,7 +39701,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
39656
39701
|
};
|
|
39657
39702
|
});
|
|
39658
39703
|
}, []);
|
|
39659
|
-
|
|
39704
|
+
useEffect76(() => {
|
|
39660
39705
|
const binding = keybindings.registerKeybinding({
|
|
39661
39706
|
key: "ArrowUp",
|
|
39662
39707
|
callback: onArrowUp,
|
|
@@ -39670,7 +39715,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
39670
39715
|
binding.unregister();
|
|
39671
39716
|
};
|
|
39672
39717
|
}, [keybindings, onArrowDown, onArrowUp]);
|
|
39673
|
-
|
|
39718
|
+
useEffect76(() => {
|
|
39674
39719
|
if (mode !== "docs") {
|
|
39675
39720
|
return;
|
|
39676
39721
|
}
|
|
@@ -39695,7 +39740,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
39695
39740
|
cancelled = true;
|
|
39696
39741
|
};
|
|
39697
39742
|
}, [actualQuery, mode]);
|
|
39698
|
-
|
|
39743
|
+
useEffect76(() => {
|
|
39699
39744
|
const binding = keybindings.registerKeybinding({
|
|
39700
39745
|
key: "ArrowDown",
|
|
39701
39746
|
callback: onArrowDown,
|
|
@@ -40349,7 +40394,7 @@ import { getDefaultOutLocation } from "@remotion/studio-shared";
|
|
|
40349
40394
|
import {
|
|
40350
40395
|
useCallback as useCallback127,
|
|
40351
40396
|
useContext as useContext83,
|
|
40352
|
-
useEffect as
|
|
40397
|
+
useEffect as useEffect79,
|
|
40353
40398
|
useMemo as useMemo128,
|
|
40354
40399
|
useReducer as useReducer2,
|
|
40355
40400
|
useRef as useRef44,
|
|
@@ -40519,7 +40564,7 @@ import { useCallback as useCallback112 } from "react";
|
|
|
40519
40564
|
import { BrowserSafeApis } from "@remotion/renderer/client";
|
|
40520
40565
|
|
|
40521
40566
|
// src/components/RenderModal/CliCopyButton.tsx
|
|
40522
|
-
import { useCallback as useCallback111, useEffect as
|
|
40567
|
+
import { useCallback as useCallback111, useEffect as useEffect77, useMemo as useMemo121, useState as useState78 } from "react";
|
|
40523
40568
|
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
40524
40569
|
var svgStyle2 = {
|
|
40525
40570
|
width: 16,
|
|
@@ -40570,7 +40615,7 @@ var CliCopyButton = ({
|
|
|
40570
40615
|
const onPointerLeave = useCallback111(() => {
|
|
40571
40616
|
setHovered(false);
|
|
40572
40617
|
}, []);
|
|
40573
|
-
|
|
40618
|
+
useEffect77(() => {
|
|
40574
40619
|
if (!copied) {
|
|
40575
40620
|
return;
|
|
40576
40621
|
}
|
|
@@ -41892,14 +41937,14 @@ import { BrowserSafeApis as BrowserSafeApis4 } from "@remotion/renderer/client";
|
|
|
41892
41937
|
import { useCallback as useCallback119, useMemo as useMemo123 } from "react";
|
|
41893
41938
|
|
|
41894
41939
|
// src/helpers/use-file-existence.ts
|
|
41895
|
-
import { useContext as useContext82, useEffect as
|
|
41940
|
+
import { useContext as useContext82, useEffect as useEffect78, useRef as useRef43, useState as useState80 } from "react";
|
|
41896
41941
|
var useFileExistence = (outName) => {
|
|
41897
41942
|
const [exists, setExists] = useState80(false);
|
|
41898
41943
|
const { previewServerState: state, subscribeToEvent } = useContext82(StudioServerConnectionCtx);
|
|
41899
41944
|
const clientId = state.type === "connected" ? state.clientId : undefined;
|
|
41900
41945
|
const currentOutName = useRef43("");
|
|
41901
41946
|
currentOutName.current = outName;
|
|
41902
|
-
|
|
41947
|
+
useEffect78(() => {
|
|
41903
41948
|
if (!clientId) {
|
|
41904
41949
|
return;
|
|
41905
41950
|
}
|
|
@@ -41915,7 +41960,7 @@ var useFileExistence = (outName) => {
|
|
|
41915
41960
|
unsubscribeFromFileExistenceWatcher({ file: outName, clientId });
|
|
41916
41961
|
};
|
|
41917
41962
|
}, [clientId, outName]);
|
|
41918
|
-
|
|
41963
|
+
useEffect78(() => {
|
|
41919
41964
|
const listener = (event) => {
|
|
41920
41965
|
if (event.type !== "watched-file-deleted") {
|
|
41921
41966
|
return;
|
|
@@ -41932,7 +41977,7 @@ var useFileExistence = (outName) => {
|
|
|
41932
41977
|
unsub();
|
|
41933
41978
|
};
|
|
41934
41979
|
}, [outName, subscribeToEvent]);
|
|
41935
|
-
|
|
41980
|
+
useEffect78(() => {
|
|
41936
41981
|
const listener = (event) => {
|
|
41937
41982
|
if (event.type !== "watched-file-undeleted") {
|
|
41938
41983
|
return;
|
|
@@ -43984,7 +44029,7 @@ var RenderModal = ({
|
|
|
43984
44029
|
offthreadVideoThreads,
|
|
43985
44030
|
mediaCacheSizeInBytes
|
|
43986
44031
|
]);
|
|
43987
|
-
|
|
44032
|
+
useEffect79(() => {
|
|
43988
44033
|
return () => {
|
|
43989
44034
|
isMounted.current = false;
|
|
43990
44035
|
};
|
|
@@ -44153,7 +44198,7 @@ var RenderModal = ({
|
|
|
44153
44198
|
onClickVideo();
|
|
44154
44199
|
}
|
|
44155
44200
|
}, [renderMode, onClickStill, onClickSequence, onClickVideo]);
|
|
44156
|
-
|
|
44201
|
+
useEffect79(() => {
|
|
44157
44202
|
if (renderDisabled) {
|
|
44158
44203
|
return;
|
|
44159
44204
|
}
|
|
@@ -44481,7 +44526,7 @@ import {
|
|
|
44481
44526
|
getEncodableAudioCodecs,
|
|
44482
44527
|
getSupportedAudioCodecsForContainer
|
|
44483
44528
|
} from "@remotion/web-renderer";
|
|
44484
|
-
import { useEffect as
|
|
44529
|
+
import { useEffect as useEffect80, useRef as useRef45, useState as useState82 } from "react";
|
|
44485
44530
|
var useEncodableAudioCodecs = (container60) => {
|
|
44486
44531
|
const cacheRef = useRef45({});
|
|
44487
44532
|
const [codecsByContainer, setCodecsByContainer] = useState82(() => {
|
|
@@ -44489,7 +44534,7 @@ var useEncodableAudioCodecs = (container60) => {
|
|
|
44489
44534
|
[container60]: getSupportedAudioCodecsForContainer(container60)
|
|
44490
44535
|
};
|
|
44491
44536
|
});
|
|
44492
|
-
|
|
44537
|
+
useEffect80(() => {
|
|
44493
44538
|
const cached = cacheRef.current[container60];
|
|
44494
44539
|
if (cached) {
|
|
44495
44540
|
return;
|
|
@@ -44523,7 +44568,7 @@ import {
|
|
|
44523
44568
|
getEncodableVideoCodecs,
|
|
44524
44569
|
getSupportedVideoCodecsForContainer
|
|
44525
44570
|
} from "@remotion/web-renderer";
|
|
44526
|
-
import { useEffect as
|
|
44571
|
+
import { useEffect as useEffect81, useRef as useRef46, useState as useState83 } from "react";
|
|
44527
44572
|
var useEncodableVideoCodecs = (container60) => {
|
|
44528
44573
|
const cacheRef = useRef46({});
|
|
44529
44574
|
const [codecsByContainer, setCodecsByContainer] = useState83(() => {
|
|
@@ -44531,7 +44576,7 @@ var useEncodableVideoCodecs = (container60) => {
|
|
|
44531
44576
|
[container60]: getSupportedVideoCodecsForContainer(container60)
|
|
44532
44577
|
};
|
|
44533
44578
|
});
|
|
44534
|
-
|
|
44579
|
+
useEffect81(() => {
|
|
44535
44580
|
const cached = cacheRef.current[container60];
|
|
44536
44581
|
if (cached) {
|
|
44537
44582
|
return;
|
|
@@ -45170,7 +45215,7 @@ var WebRenderModalBasic = ({
|
|
|
45170
45215
|
};
|
|
45171
45216
|
|
|
45172
45217
|
// src/components/RenderModal/WebRenderModalLicense.tsx
|
|
45173
|
-
import { useCallback as useCallback129, useEffect as
|
|
45218
|
+
import { useCallback as useCallback129, useEffect as useEffect82, useState as useState84 } from "react";
|
|
45174
45219
|
|
|
45175
45220
|
// src/icons/check-circle-filled.tsx
|
|
45176
45221
|
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
@@ -45392,7 +45437,7 @@ var WebRenderModalLicense = ({
|
|
|
45392
45437
|
}) => {
|
|
45393
45438
|
const [licenseValidation, setLicenseValidation] = useState84({ valid: true, message: null, details: null });
|
|
45394
45439
|
const [isLoading, setIsLoading] = useState84(false);
|
|
45395
|
-
|
|
45440
|
+
useEffect82(() => {
|
|
45396
45441
|
if (licenseKey === null || licenseKey === "free-license") {
|
|
45397
45442
|
return setLicenseValidation({
|
|
45398
45443
|
valid: true,
|
|
@@ -45741,7 +45786,21 @@ var WebRenderModal = ({
|
|
|
45741
45786
|
inFrameMark,
|
|
45742
45787
|
outFrameMark,
|
|
45743
45788
|
initialLogLevel,
|
|
45744
|
-
initialLicenseKey
|
|
45789
|
+
initialLicenseKey,
|
|
45790
|
+
initialStillImageFormat,
|
|
45791
|
+
initialDefaultOutName,
|
|
45792
|
+
initialScale,
|
|
45793
|
+
initialDelayRenderTimeout,
|
|
45794
|
+
initialMediaCacheSizeInBytes,
|
|
45795
|
+
initialContainer,
|
|
45796
|
+
initialVideoCodec,
|
|
45797
|
+
initialAudioCodec,
|
|
45798
|
+
initialAudioBitrate,
|
|
45799
|
+
initialVideoBitrate,
|
|
45800
|
+
initialHardwareAcceleration,
|
|
45801
|
+
initialKeyframeIntervalInSeconds,
|
|
45802
|
+
initialTransparent,
|
|
45803
|
+
initialMuted
|
|
45745
45804
|
}) => {
|
|
45746
45805
|
const context = useContext84(ResolvedCompositionContext);
|
|
45747
45806
|
const { setSelectedModal } = useContext84(ModalsContext);
|
|
@@ -45759,25 +45818,25 @@ var WebRenderModal = ({
|
|
|
45759
45818
|
});
|
|
45760
45819
|
const [renderMode, setRenderMode] = useState85(isVideo ? "video" : "still");
|
|
45761
45820
|
const [tab, setTab] = useState85("general");
|
|
45762
|
-
const [imageFormat, setImageFormat] = useState85("png");
|
|
45821
|
+
const [imageFormat, setImageFormat] = useState85(() => initialStillImageFormat ?? "png");
|
|
45763
45822
|
const [frame2, setFrame] = useState85(() => initialFrame);
|
|
45764
45823
|
const [logLevel, setLogLevel] = useState85(() => initialLogLevel);
|
|
45765
45824
|
const [inputProps, setInputProps] = useState85(() => defaultProps);
|
|
45766
|
-
const [delayRenderTimeout, setDelayRenderTimeout] = useState85(30000);
|
|
45767
|
-
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState85(
|
|
45825
|
+
const [delayRenderTimeout, setDelayRenderTimeout] = useState85(initialDelayRenderTimeout ?? 30000);
|
|
45826
|
+
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState85(initialMediaCacheSizeInBytes);
|
|
45768
45827
|
const [saving, setSaving] = useState85(false);
|
|
45769
|
-
const [codec, setCodec] = useState85("h264");
|
|
45770
|
-
const [container61, setContainer] = useState85("mp4");
|
|
45771
|
-
const [audioCodec, setAudioCodec] = useState85("aac");
|
|
45772
|
-
const [audioBitrate, setAudioBitrate] = useState85("medium");
|
|
45773
|
-
const [videoBitrate, setVideoBitrate] = useState85("high");
|
|
45774
|
-
const [hardwareAcceleration, setHardwareAcceleration] = useState85("no-preference");
|
|
45775
|
-
const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState85(5);
|
|
45776
|
-
const [startFrame, setStartFrame] = useState85(() => inFrameMark
|
|
45777
|
-
const [endFrame, setEndFrame] = useState85(() => outFrameMark
|
|
45778
|
-
const [transparent, setTransparent] = useState85(false);
|
|
45779
|
-
const [muted, setMuted] = useState85(false);
|
|
45780
|
-
const [scale, setScale] = useState85(1);
|
|
45828
|
+
const [codec, setCodec] = useState85(initialVideoCodec ?? "h264");
|
|
45829
|
+
const [container61, setContainer] = useState85(initialContainer ?? "mp4");
|
|
45830
|
+
const [audioCodec, setAudioCodec] = useState85(initialAudioCodec ?? "aac");
|
|
45831
|
+
const [audioBitrate, setAudioBitrate] = useState85(initialAudioBitrate ?? "medium");
|
|
45832
|
+
const [videoBitrate, setVideoBitrate] = useState85(initialVideoBitrate ?? "high");
|
|
45833
|
+
const [hardwareAcceleration, setHardwareAcceleration] = useState85(initialHardwareAcceleration ?? "no-preference");
|
|
45834
|
+
const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState85(initialKeyframeIntervalInSeconds ?? 5);
|
|
45835
|
+
const [startFrame, setStartFrame] = useState85(() => inFrameMark);
|
|
45836
|
+
const [endFrame, setEndFrame] = useState85(() => outFrameMark);
|
|
45837
|
+
const [transparent, setTransparent] = useState85(initialTransparent ?? false);
|
|
45838
|
+
const [muted, setMuted] = useState85(initialMuted ?? false);
|
|
45839
|
+
const [scale, setScale] = useState85(initialScale ?? 1);
|
|
45781
45840
|
const [licenseKey, setLicenseKey] = useState85(initialLicenseKey);
|
|
45782
45841
|
const encodableAudioCodecs = useEncodableAudioCodecs(container61);
|
|
45783
45842
|
const encodableVideoCodecs = useEncodableVideoCodecs(container61);
|
|
@@ -45805,7 +45864,10 @@ var WebRenderModal = ({
|
|
|
45805
45864
|
}
|
|
45806
45865
|
return Math.max(0, Math.min(finalEndFrame, startFrame));
|
|
45807
45866
|
}, [finalEndFrame, startFrame]);
|
|
45808
|
-
const [
|
|
45867
|
+
const [initialOutNameState] = useState85(() => {
|
|
45868
|
+
if (initialDefaultOutName) {
|
|
45869
|
+
return initialDefaultOutName;
|
|
45870
|
+
}
|
|
45809
45871
|
return getDefaultOutLocation2({
|
|
45810
45872
|
compositionName: resolvedComposition.id,
|
|
45811
45873
|
defaultExtension: renderMode === "still" ? imageFormat : isVideo ? container61 : imageFormat,
|
|
@@ -45814,7 +45876,7 @@ var WebRenderModal = ({
|
|
|
45814
45876
|
clientSideRender: true
|
|
45815
45877
|
});
|
|
45816
45878
|
});
|
|
45817
|
-
const [outName, setOutName] = useState85(() =>
|
|
45879
|
+
const [outName, setOutName] = useState85(() => initialOutNameState);
|
|
45818
45880
|
const setStillFormat = useCallback131((format) => {
|
|
45819
45881
|
setImageFormat(format);
|
|
45820
45882
|
setOutName((prev) => {
|
|
@@ -46226,7 +46288,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
46226
46288
|
import { useCallback as useCallback134, useMemo as useMemo135 } from "react";
|
|
46227
46289
|
|
|
46228
46290
|
// src/components/CopyButton.tsx
|
|
46229
|
-
import { useCallback as useCallback132, useEffect as
|
|
46291
|
+
import { useCallback as useCallback132, useEffect as useEffect83, useState as useState86 } from "react";
|
|
46230
46292
|
import { jsx as jsx269, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
46231
46293
|
var iconStyle8 = {
|
|
46232
46294
|
width: 16,
|
|
@@ -46264,7 +46326,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
|
|
|
46264
46326
|
showNotification(`Could not copy: ${err.message}`, 2000);
|
|
46265
46327
|
});
|
|
46266
46328
|
}, [textToCopy]);
|
|
46267
|
-
|
|
46329
|
+
useEffect83(() => {
|
|
46268
46330
|
if (!copied) {
|
|
46269
46331
|
return;
|
|
46270
46332
|
}
|
|
@@ -46521,14 +46583,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
46521
46583
|
}),
|
|
46522
46584
|
modalContextType && modalContextType.type === "input-props-override" && /* @__PURE__ */ jsx273(OverrideInputPropsModal, {}),
|
|
46523
46585
|
modalContextType && modalContextType.type === "web-render" && /* @__PURE__ */ jsx273(WebRenderModalWithLoader, {
|
|
46524
|
-
|
|
46525
|
-
initialFrame: modalContextType.initialFrame,
|
|
46526
|
-
compositionId: modalContextType.compositionId,
|
|
46527
|
-
defaultProps: modalContextType.defaultProps,
|
|
46528
|
-
inFrameMark: modalContextType.inFrameMark,
|
|
46529
|
-
outFrameMark: modalContextType.outFrameMark,
|
|
46530
|
-
initialLogLevel: modalContextType.initialLogLevel,
|
|
46531
|
-
initialLicenseKey: modalContextType.initialLicenseKey
|
|
46586
|
+
...modalContextType
|
|
46532
46587
|
}),
|
|
46533
46588
|
modalContextType && canRender && modalContextType.type === "server-render" && /* @__PURE__ */ jsx273(RenderModalWithLoader, {
|
|
46534
46589
|
initialFrame: modalContextType.initialFrame,
|
|
@@ -46616,7 +46671,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
46616
46671
|
triggerOnWindowResize: false,
|
|
46617
46672
|
shouldApplyCssTransforms: true
|
|
46618
46673
|
});
|
|
46619
|
-
|
|
46674
|
+
useEffect84(() => {
|
|
46620
46675
|
if (readOnlyStudio) {
|
|
46621
46676
|
return;
|
|
46622
46677
|
}
|
|
@@ -46814,7 +46869,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
46814
46869
|
|
|
46815
46870
|
// src/components/RenderQueue/ClientRenderQueueProcessor.tsx
|
|
46816
46871
|
import { renderMediaOnWeb, renderStillOnWeb } from "@remotion/web-renderer";
|
|
46817
|
-
import { useCallback as useCallback138, useContext as useContext87, useEffect as
|
|
46872
|
+
import { useCallback as useCallback138, useContext as useContext87, useEffect as useEffect85 } from "react";
|
|
46818
46873
|
var downloadBlob = (blob, filename) => {
|
|
46819
46874
|
const url = URL.createObjectURL(blob);
|
|
46820
46875
|
const a = document.createElement("a");
|
|
@@ -46950,7 +47005,7 @@ var ClientRenderQueueProcessor = () => {
|
|
|
46950
47005
|
markClientJobFailed,
|
|
46951
47006
|
markClientJobCancelled
|
|
46952
47007
|
]);
|
|
46953
|
-
|
|
47008
|
+
useEffect85(() => {
|
|
46954
47009
|
setProcessJobCallback(processJob);
|
|
46955
47010
|
return () => setProcessJobCallback(null);
|
|
46956
47011
|
}, [processJob, setProcessJobCallback]);
|
|
@@ -46958,7 +47013,7 @@ var ClientRenderQueueProcessor = () => {
|
|
|
46958
47013
|
};
|
|
46959
47014
|
|
|
46960
47015
|
// src/components/SetTimelineInOutProvider.tsx
|
|
46961
|
-
import { useEffect as
|
|
47016
|
+
import { useEffect as useEffect86, useMemo as useMemo141, useState as useState92 } from "react";
|
|
46962
47017
|
|
|
46963
47018
|
// src/state/marks.ts
|
|
46964
47019
|
var localStorageKey5 = () => `remotion.editor.marksv2`;
|
|
@@ -46982,7 +47037,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
46982
47037
|
setInAndOutFrames
|
|
46983
47038
|
};
|
|
46984
47039
|
}, []);
|
|
46985
|
-
|
|
47040
|
+
useEffect86(() => {
|
|
46986
47041
|
persistMarks(inAndOutFrames);
|
|
46987
47042
|
}, [inAndOutFrames]);
|
|
46988
47043
|
return /* @__PURE__ */ jsx279(TimelineInOutContext.Provider, {
|