@remotion/cli 4.0.41 → 4.0.43
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/config/chromium-flags.d.ts +2 -0
- package/dist/config/chromium-flags.js +8 -1
- package/dist/config/index.d.ts +9 -1
- package/dist/config/index.js +2 -0
- package/dist/config/log.d.ts +1 -1
- package/dist/config/presets-profile.d.ts +3 -0
- package/dist/config/presets-profile.js +12 -0
- package/dist/editor/components/CopyButton.js +1 -1
- package/dist/editor/components/JSONViewer.d.ts +4 -0
- package/dist/editor/components/JSONViewer.js +26 -0
- package/dist/editor/components/KnownBugs.js +5 -1
- package/dist/editor/components/Modals.js +2 -2
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderButton.js +1 -0
- package/dist/editor/components/RenderModal/RenderModal.d.ts +1 -0
- package/dist/editor/components/RenderModal/RenderModal.js +43 -6
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +2 -0
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +5 -2
- package/dist/editor/components/RenderQueue/actions.d.ts +6 -3
- package/dist/editor/components/RenderQueue/actions.js +6 -3
- package/dist/editor/components/RenderQueue/index.js +40 -2
- package/dist/editor/components/SidebarRenderButton.js +1 -0
- package/dist/editor/components/UpdateCheck.d.ts +7 -0
- package/dist/editor/components/UpdateCheck.js +36 -5
- package/dist/editor/components/UpdateModal/UpdateModal.d.ts +2 -1
- package/dist/editor/components/UpdateModal/UpdateModal.js +27 -11
- package/dist/editor/helpers/checkerboard-background.d.ts +1 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/editor/state/modals.d.ts +3 -1
- package/dist/get-cli-options.d.ts +2 -2
- package/dist/get-cli-options.js +1 -0
- package/dist/handle-common-errors.d.ts +2 -0
- package/dist/handle-common-errors.js +60 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.js +10 -1
- package/dist/log.d.ts +4 -4
- package/dist/parse-command-line.d.ts +2 -1
- package/dist/parse-command-line.js +4 -0
- package/dist/preview-server/render-queue/job.d.ts +2 -0
- package/dist/preview-server/render-queue/make-retry-payload.js +3 -0
- package/dist/preview-server/routes/add-render.js +3 -0
- package/dist/preview-server/routes.d.ts +1 -0
- package/dist/preview-server/routes.js +2 -0
- package/dist/render-flows/render.js +1 -0
- package/package.json +8 -8
|
@@ -7,3 +7,5 @@ export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl
|
|
|
7
7
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
8
8
|
export declare const getChromiumHeadlessMode: () => boolean;
|
|
9
9
|
export declare const setChromiumHeadlessMode: (should: boolean) => void;
|
|
10
|
+
export declare const getChromiumMultiProcessOnLinux: () => boolean;
|
|
11
|
+
export declare const setChromiumMultiProcessOnLinux: (should: boolean) => void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setChromiumHeadlessMode = exports.getChromiumHeadlessMode = exports.setChromiumOpenGlRenderer = exports.getChromiumOpenGlRenderer = exports.setChromiumIgnoreCertificateErrors = exports.getIgnoreCertificateErrors = exports.setChromiumDisableWebSecurity = exports.getChromiumDisableWebSecurity = void 0;
|
|
3
|
+
exports.setChromiumMultiProcessOnLinux = exports.getChromiumMultiProcessOnLinux = exports.setChromiumHeadlessMode = exports.getChromiumHeadlessMode = exports.setChromiumOpenGlRenderer = exports.getChromiumOpenGlRenderer = exports.setChromiumIgnoreCertificateErrors = exports.getIgnoreCertificateErrors = exports.setChromiumDisableWebSecurity = exports.getChromiumDisableWebSecurity = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
let chromiumDisableWebSecurity = false;
|
|
6
6
|
let ignoreCertificateErrors = false;
|
|
7
7
|
let openGlRenderer = renderer_1.RenderInternals.DEFAULT_OPENGL_RENDERER;
|
|
8
8
|
let headlessMode = true;
|
|
9
|
+
let multiProcessOnLinux = false;
|
|
9
10
|
const getChromiumDisableWebSecurity = () => chromiumDisableWebSecurity;
|
|
10
11
|
exports.getChromiumDisableWebSecurity = getChromiumDisableWebSecurity;
|
|
11
12
|
const setChromiumDisableWebSecurity = (should) => {
|
|
@@ -31,3 +32,9 @@ const setChromiumHeadlessMode = (should) => {
|
|
|
31
32
|
headlessMode = should;
|
|
32
33
|
};
|
|
33
34
|
exports.setChromiumHeadlessMode = setChromiumHeadlessMode;
|
|
35
|
+
const getChromiumMultiProcessOnLinux = () => multiProcessOnLinux;
|
|
36
|
+
exports.getChromiumMultiProcessOnLinux = getChromiumMultiProcessOnLinux;
|
|
37
|
+
const setChromiumMultiProcessOnLinux = (should) => {
|
|
38
|
+
multiProcessOnLinux = should;
|
|
39
|
+
};
|
|
40
|
+
exports.setChromiumMultiProcessOnLinux = setChromiumMultiProcessOnLinux;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -243,6 +243,13 @@ declare global {
|
|
|
243
243
|
* Opt into bt709 rendering.
|
|
244
244
|
*/
|
|
245
245
|
readonly setColorSpace: (colorSpace: ColorSpace) => void;
|
|
246
|
+
/**
|
|
247
|
+
* Removes the --single-process flag that gets passed to
|
|
248
|
+
Chromium on Linux by default. This will make the render faster because
|
|
249
|
+
multiple processes can be used, but may cause issues with some Linux
|
|
250
|
+
distributions or if window server libraries are missing.
|
|
251
|
+
*/
|
|
252
|
+
readonly setChromiumMultiProcessOnLinux: (multiProcessOnLinux: boolean) => void;
|
|
246
253
|
}
|
|
247
254
|
}
|
|
248
255
|
type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
|
|
@@ -288,7 +295,7 @@ export declare const ConfigInternals: {
|
|
|
288
295
|
getOutputCodecOrUndefined: () => CodecOrUndefined;
|
|
289
296
|
getBrowser: () => null;
|
|
290
297
|
getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
291
|
-
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "
|
|
298
|
+
getProResProfile: () => "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
|
|
292
299
|
getPresetProfile: () => "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
293
300
|
getShouldOverwrite: ({ defaultValue, }: {
|
|
294
301
|
defaultValue: boolean;
|
|
@@ -339,4 +346,5 @@ export declare const ConfigInternals: {
|
|
|
339
346
|
getDeleteAfter: () => ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
340
347
|
getColorSpace: () => "default" | "bt709";
|
|
341
348
|
getEnableFolderExpiry: () => boolean | null;
|
|
349
|
+
getChromiumMultiProcessOnLinux: () => boolean;
|
|
342
350
|
};
|
package/dist/config/index.js
CHANGED
|
@@ -128,6 +128,7 @@ exports.Config = {
|
|
|
128
128
|
setChromiumUserAgent: user_agent_1.setChromiumUserAgent,
|
|
129
129
|
setDotEnvLocation: env_file_2.setDotEnvLocation,
|
|
130
130
|
setConcurrency: concurrency_2.setConcurrency,
|
|
131
|
+
setChromiumMultiProcessOnLinux: chromium_flags_1.setChromiumMultiProcessOnLinux,
|
|
131
132
|
setQuality: () => {
|
|
132
133
|
throw new Error('setQuality() has been renamed - use setJpegQuality() instead.');
|
|
133
134
|
},
|
|
@@ -216,4 +217,5 @@ exports.ConfigInternals = {
|
|
|
216
217
|
getDeleteAfter: render_folder_expiry_1.getDeleteAfter,
|
|
217
218
|
getColorSpace: color_space_1.getColorSpace,
|
|
218
219
|
getEnableFolderExpiry: enable_folder_expiry_1.getEnableFolderExpiry,
|
|
220
|
+
getChromiumMultiProcessOnLinux: chromium_flags_1.getChromiumMultiProcessOnLinux,
|
|
219
221
|
};
|
package/dist/config/log.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getLogLevel: () => "
|
|
1
|
+
export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn", setLogLevel: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setPresetProfile = exports.getPresetProfile = void 0;
|
|
4
|
+
let preset;
|
|
5
|
+
const getPresetProfile = () => {
|
|
6
|
+
return preset;
|
|
7
|
+
};
|
|
8
|
+
exports.getPresetProfile = getPresetProfile;
|
|
9
|
+
const setPresetProfile = (profile) => {
|
|
10
|
+
preset = profile;
|
|
11
|
+
};
|
|
12
|
+
exports.setPresetProfile = setPresetProfile;
|
|
@@ -38,6 +38,6 @@ const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
|
|
|
38
38
|
const to = setTimeout(() => setCopied(false), 2000);
|
|
39
39
|
return () => clearTimeout(to);
|
|
40
40
|
}, [copied]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: onClick,
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: onClick, buttonContainerStyle: buttonContainerStyle, children: [copyIcon, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), ' ', (0, jsx_runtime_1.jsx)("span", { style: labelStyle, children: copied ? labelWhenCopied : label })] }));
|
|
42
42
|
};
|
|
43
43
|
exports.CopyButton = CopyButton;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JSONViewer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const RemTextarea_1 = require("./NewComposition/RemTextarea");
|
|
7
|
+
const jsonStyle = {
|
|
8
|
+
marginTop: 14,
|
|
9
|
+
marginBottom: 14,
|
|
10
|
+
fontFamily: 'monospace',
|
|
11
|
+
flex: 1,
|
|
12
|
+
};
|
|
13
|
+
const JSONViewer = ({ src }) => {
|
|
14
|
+
const [json, setJson] = (0, react_1.useState)(null);
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
fetch(src)
|
|
17
|
+
.then((res) => res.json())
|
|
18
|
+
.then((jsonRes) => {
|
|
19
|
+
setJson(JSON.stringify(jsonRes, null, 2));
|
|
20
|
+
});
|
|
21
|
+
}, [src]);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { value: json !== null && json !== void 0 ? json : undefined, status: "ok", onChange: () => {
|
|
23
|
+
return null;
|
|
24
|
+
}, style: jsonStyle }));
|
|
25
|
+
};
|
|
26
|
+
exports.JSONViewer = JSONViewer;
|
|
@@ -8,9 +8,13 @@ const container = {
|
|
|
8
8
|
flexDirection: 'row',
|
|
9
9
|
alignItems: 'center',
|
|
10
10
|
};
|
|
11
|
+
const text = {
|
|
12
|
+
fontSize: 14,
|
|
13
|
+
flex: 1,
|
|
14
|
+
};
|
|
11
15
|
const KnownBugs = ({ bugs }) => {
|
|
12
16
|
const bugElements = bugs.map((bug) => {
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["\uD83E\uDEB2 ", bug.title] }), (0, jsx_runtime_1.jsx)(OpenIssueButton_1.OpenIssueButton, { link: bug.link })] }, bug.description + bug.link));
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsxs)("div", { style: text, children: ["\uD83E\uDEB2 ", bug.title] }), (0, jsx_runtime_1.jsx)(OpenIssueButton_1.OpenIssueButton, { link: bug.link })] }, bug.description + bug.link));
|
|
14
18
|
});
|
|
15
19
|
return (0, jsx_runtime_1.jsx)("div", { children: bugElements });
|
|
16
20
|
};
|
|
@@ -16,8 +16,8 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
|
16
16
|
const Modals = () => {
|
|
17
17
|
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
18
18
|
const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type === 'connected';
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, initialColorSpace: modalContextType.initialColorSpace })), modalContextType &&
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux })), modalContextType &&
|
|
20
20
|
canRender &&
|
|
21
|
-
modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
|
|
21
|
+
modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
|
|
22
22
|
};
|
|
23
23
|
exports.Modals = Modals;
|
|
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
12
12
|
status: 'error' | 'warning' | 'ok';
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
|
-
}) => "hsla(0, 0%, 100%, 0.15)" | "#ff3232" | "rgba(
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
15
|
+
}) => "hsla(0, 0%, 100%, 0.15)" | "#ff3232" | "#f1c40f" | "rgba(255, 255, 255, 0.05)" | "rgba(0, 0, 0, 0.6)";
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaEleme
|
|
|
3
3
|
status: 'error' | 'warning' | 'ok';
|
|
4
4
|
};
|
|
5
5
|
export declare const inputBaseStyle: React.CSSProperties;
|
|
6
|
-
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "
|
|
6
|
+
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
export {};
|
|
@@ -100,6 +100,7 @@ const RenderButton = () => {
|
|
|
100
100
|
inFrameMark: inFrame,
|
|
101
101
|
outFrameMark: outFrame,
|
|
102
102
|
initialColorSpace: defaults.colorSpace,
|
|
103
|
+
initialMultiProcessOnLinux: defaults.multiProcessOnLinux,
|
|
103
104
|
});
|
|
104
105
|
}, [video, setSelectedModal, frame, props, inFrame, outFrame]);
|
|
105
106
|
if (!video) {
|
|
@@ -37,6 +37,7 @@ type RenderModalProps = {
|
|
|
37
37
|
defaultProps: Record<string, unknown>;
|
|
38
38
|
inFrameMark: number | null;
|
|
39
39
|
outFrameMark: number | null;
|
|
40
|
+
initialMultiProcessOnLinux: boolean;
|
|
40
41
|
};
|
|
41
42
|
export declare const RenderModalWithLoader: React.FC<RenderModalProps>;
|
|
42
43
|
export {};
|
|
@@ -114,13 +114,14 @@ const outer = {
|
|
|
114
114
|
display: 'flex',
|
|
115
115
|
flexDirection: 'column',
|
|
116
116
|
};
|
|
117
|
-
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, initialColorSpace, }) => {
|
|
117
|
+
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, initialColorSpace, initialMultiProcessOnLinux, }) => {
|
|
118
118
|
const isMounted = (0, react_1.useRef)(true);
|
|
119
119
|
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
120
120
|
const [unclampedFrame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
121
121
|
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
122
122
|
const [stillImageFormat, setStillImageFormat] = (0, react_1.useState)(() => initialStillImageFormat);
|
|
123
123
|
const [videoImageFormat, setVideoImageFormat] = (0, react_1.useState)(() => initialVideoImageFormat);
|
|
124
|
+
const [sequenceImageFormat, setSequenceImageFormat] = (0, react_1.useState)(() => initialStillImageFormat === 'jpeg' ? 'jpeg' : 'png');
|
|
124
125
|
const [concurrency, setConcurrency] = (0, react_1.useState)(() => initialConcurrency);
|
|
125
126
|
const [videoCodecForVideoTab, setVideoCodecForVideoTab] = (0, react_1.useState)(() => initialVideoCodecForVideoTab);
|
|
126
127
|
const [userSelectedAudioCodec, setUserSelectedAudioCodec] = (0, react_1.useState)(() => initialAudioCodec);
|
|
@@ -136,6 +137,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
136
137
|
const [disableWebSecurity, setDisableWebSecurity] = (0, react_1.useState)(() => initialDisableWebSecurity);
|
|
137
138
|
const [headless, setHeadless] = (0, react_1.useState)(() => initialHeadless);
|
|
138
139
|
const [ignoreCertificateErrors, setIgnoreCertificateErrors] = (0, react_1.useState)(() => initialIgnoreCertificateErrors);
|
|
140
|
+
const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = (0, react_1.useState)(() => initialMultiProcessOnLinux);
|
|
139
141
|
const [openGlOption, setOpenGlOption] = (0, react_1.useState)(() => initialGl !== null && initialGl !== void 0 ? initialGl : 'default');
|
|
140
142
|
const [colorSpace, setColorSpace] = (0, react_1.useState)(() => initialColorSpace);
|
|
141
143
|
const chromiumOptions = (0, react_1.useMemo)(() => {
|
|
@@ -146,8 +148,15 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
146
148
|
gl: openGlOption === 'default' ? null : openGlOption,
|
|
147
149
|
// TODO: Make this configurable at some point (not necessary for V4)
|
|
148
150
|
userAgent: null,
|
|
151
|
+
enableMultiProcessOnLinux: multiProcessOnLinux,
|
|
149
152
|
};
|
|
150
|
-
}, [
|
|
153
|
+
}, [
|
|
154
|
+
headless,
|
|
155
|
+
disableWebSecurity,
|
|
156
|
+
ignoreCertificateErrors,
|
|
157
|
+
openGlOption,
|
|
158
|
+
multiProcessOnLinux,
|
|
159
|
+
]);
|
|
151
160
|
const [outName, setOutName] = (0, react_1.useState)(() => initialOutName);
|
|
152
161
|
const [endFrameOrNull, setEndFrame] = (0, react_1.useState)(() => outFrameMark !== null && outFrameMark !== void 0 ? outFrameMark : null);
|
|
153
162
|
const [startFrameOrNull, setStartFrame] = (0, react_1.useState)(() => inFrameMark !== null && inFrameMark !== void 0 ? inFrameMark : null);
|
|
@@ -345,6 +354,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
345
354
|
envVariables: (0, convert_env_variables_1.envVariablesArrayToObject)(envVariables),
|
|
346
355
|
inputProps,
|
|
347
356
|
offthreadVideoCacheSizeInBytes,
|
|
357
|
+
multiProcessOnLinux,
|
|
348
358
|
})
|
|
349
359
|
.then(() => {
|
|
350
360
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -368,6 +378,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
368
378
|
envVariables,
|
|
369
379
|
inputProps,
|
|
370
380
|
offthreadVideoCacheSizeInBytes,
|
|
381
|
+
multiProcessOnLinux,
|
|
371
382
|
onClose,
|
|
372
383
|
]);
|
|
373
384
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = (0, react_1.useState)(() => initialEveryNthFrame);
|
|
@@ -413,6 +424,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
413
424
|
inputProps,
|
|
414
425
|
offthreadVideoCacheSizeInBytes,
|
|
415
426
|
colorSpace,
|
|
427
|
+
multiProcessOnLinux,
|
|
416
428
|
})
|
|
417
429
|
.then(() => {
|
|
418
430
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -454,6 +466,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
454
466
|
inputProps,
|
|
455
467
|
offthreadVideoCacheSizeInBytes,
|
|
456
468
|
colorSpace,
|
|
469
|
+
multiProcessOnLinux,
|
|
457
470
|
onClose,
|
|
458
471
|
]);
|
|
459
472
|
const onClickSequence = (0, react_1.useCallback)(() => {
|
|
@@ -465,7 +478,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
465
478
|
(0, actions_1.addSequenceRenderJob)({
|
|
466
479
|
compositionId: resolvedComposition.id,
|
|
467
480
|
outName,
|
|
468
|
-
imageFormat:
|
|
481
|
+
imageFormat: sequenceImageFormat,
|
|
469
482
|
scale,
|
|
470
483
|
verbose,
|
|
471
484
|
concurrency,
|
|
@@ -478,6 +491,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
478
491
|
inputProps,
|
|
479
492
|
offthreadVideoCacheSizeInBytes,
|
|
480
493
|
disallowParallelEncoding,
|
|
494
|
+
multiProcessOnLinux,
|
|
481
495
|
})
|
|
482
496
|
.then(() => {
|
|
483
497
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -491,7 +505,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
491
505
|
dispatchIfMounted,
|
|
492
506
|
resolvedComposition.id,
|
|
493
507
|
outName,
|
|
494
|
-
|
|
508
|
+
sequenceImageFormat,
|
|
495
509
|
scale,
|
|
496
510
|
verbose,
|
|
497
511
|
concurrency,
|
|
@@ -504,6 +518,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
504
518
|
inputProps,
|
|
505
519
|
offthreadVideoCacheSizeInBytes,
|
|
506
520
|
disallowParallelEncoding,
|
|
521
|
+
multiProcessOnLinux,
|
|
507
522
|
onClose,
|
|
508
523
|
]);
|
|
509
524
|
(0, react_1.useEffect)(() => {
|
|
@@ -540,6 +555,22 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
540
555
|
},
|
|
541
556
|
];
|
|
542
557
|
}
|
|
558
|
+
if (renderMode === 'sequence') {
|
|
559
|
+
return [
|
|
560
|
+
{
|
|
561
|
+
label: 'PNG',
|
|
562
|
+
onClick: () => setSequenceImageFormat('png'),
|
|
563
|
+
key: 'png',
|
|
564
|
+
selected: sequenceImageFormat === 'png',
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
label: 'JPEG',
|
|
568
|
+
onClick: () => setSequenceImageFormat('jpeg'),
|
|
569
|
+
key: 'jpeg',
|
|
570
|
+
selected: sequenceImageFormat === 'jpeg',
|
|
571
|
+
},
|
|
572
|
+
];
|
|
573
|
+
}
|
|
543
574
|
return [
|
|
544
575
|
{
|
|
545
576
|
label: 'PNG',
|
|
@@ -554,7 +585,13 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
554
585
|
selected: videoImageFormat === 'jpeg',
|
|
555
586
|
},
|
|
556
587
|
];
|
|
557
|
-
}, [
|
|
588
|
+
}, [
|
|
589
|
+
renderMode,
|
|
590
|
+
videoImageFormat,
|
|
591
|
+
stillImageFormat,
|
|
592
|
+
setStillFormat,
|
|
593
|
+
sequenceImageFormat,
|
|
594
|
+
]);
|
|
558
595
|
const setRenderMode = (0, react_1.useCallback)((newRenderMode) => {
|
|
559
596
|
setRenderModeState(newRenderMode);
|
|
560
597
|
if (newRenderMode === 'audio') {
|
|
@@ -675,7 +712,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
675
712
|
return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${resolvedComposition.id}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
|
|
676
713
|
...buttonStyle,
|
|
677
714
|
backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
|
|
678
|
-
}, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setColorSpace: setColorSpace, colorSpace: colorSpace, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { x264Preset: x264Preset, setx264Preset: setx264Preset, concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables, offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes: setOffthreadVideoCacheSizeInBytes, codec: codec })) })] })] }));
|
|
715
|
+
}, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setColorSpace: setColorSpace, colorSpace: colorSpace, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { x264Preset: x264Preset, setx264Preset: setx264Preset, concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables, offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes: setOffthreadVideoCacheSizeInBytes, enableMultiProcessOnLinux: multiProcessOnLinux, setChromiumMultiProcessOnLinux: setChromiumMultiProcessOnLinux, codec: codec })) })] })] }));
|
|
679
716
|
};
|
|
680
717
|
const RenderModalWithLoader = (props) => {
|
|
681
718
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
@@ -29,4 +29,6 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
29
29
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
30
30
|
setOffthreadVideoCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
31
31
|
codec: Codec;
|
|
32
|
+
enableMultiProcessOnLinux: boolean;
|
|
33
|
+
setChromiumMultiProcessOnLinux: React.Dispatch<React.SetStateAction<boolean>>;
|
|
32
34
|
}>;
|
|
@@ -17,7 +17,7 @@ const container = {
|
|
|
17
17
|
flex: 1,
|
|
18
18
|
overflowY: 'auto',
|
|
19
19
|
};
|
|
20
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, }) => {
|
|
20
|
+
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, enableMultiProcessOnLinux, setChromiumMultiProcessOnLinux, }) => {
|
|
21
21
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
22
22
|
return ['angle', 'egl', 'swangle', 'swiftshader', 'vulkan', 'default'];
|
|
23
23
|
}, []);
|
|
@@ -38,6 +38,9 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
38
38
|
const onDisableWebSecurityChanged = (0, react_1.useCallback)((e) => {
|
|
39
39
|
setDisableWebSecurity(e.target.checked);
|
|
40
40
|
}, [setDisableWebSecurity]);
|
|
41
|
+
const onEnableMultiProcessOnLinux = (0, react_1.useCallback)((e) => {
|
|
42
|
+
setChromiumMultiProcessOnLinux(e.target.checked);
|
|
43
|
+
}, [setChromiumMultiProcessOnLinux]);
|
|
41
44
|
const onIgnoreCertificatErrors = (0, react_1.useCallback)((e) => {
|
|
42
45
|
setIgnoreCertificateErrors(e.target.checked);
|
|
43
46
|
}, [setIgnoreCertificateErrors]);
|
|
@@ -93,6 +96,6 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
93
96
|
, {
|
|
94
97
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
95
98
|
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })] }), renderMode === 'audio' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom OffthreadVideo cache" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: offthreadVideoCacheSizeInBytes !== null, onChange: toggleCustomOffthreadVideoCacheSizeInBytes, name: "custom-audio-bitrate" }) })] })), renderMode === 'audio' ||
|
|
96
|
-
offthreadVideoCacheSizeInBytes === null ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: 2000 * 1024 * 1024, step: 1024, name: "OffthreadVideo cache size", formatter: (w) => `${w} bytes`, onValueChanged: changeOffthreadVideoCacheSizeInBytes, value: offthreadVideoCacheSizeInBytes })), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: verbose, onChange: onVerboseLoggingChanged, name: "verbose-logging" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disableWebSecurity, onChange: onDisableWebSecurityChanged, name: "disable-web-security" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Ignore certificate errors " }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: ignoreCertificateErrors, onChange: onIgnoreCertificatErrors, name: "ignore-certificate-errors" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless, name: "headless" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "OpenGL render backend" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
|
|
99
|
+
offthreadVideoCacheSizeInBytes === null ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: 2000 * 1024 * 1024, step: 1024, name: "OffthreadVideo cache size", formatter: (w) => `${w} bytes`, onValueChanged: changeOffthreadVideoCacheSizeInBytes, value: offthreadVideoCacheSizeInBytes })), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: verbose, onChange: onVerboseLoggingChanged, name: "verbose-logging" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disableWebSecurity, onChange: onDisableWebSecurityChanged, name: "disable-web-security" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Ignore certificate errors " }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: ignoreCertificateErrors, onChange: onIgnoreCertificatErrors, name: "ignore-certificate-errors" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless, name: "headless" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "OpenGL render backend" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Multi-process Chrome on Linux" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: enableMultiProcessOnLinux, onChange: onEnableMultiProcessOnLinux, name: "enable-multi-process-on-linux" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
|
|
97
100
|
};
|
|
98
101
|
exports.RenderModalAdvanced = RenderModalAdvanced;
|
|
@@ -2,7 +2,7 @@ import type { AudioCodec, Codec, ColorSpace, PixelFormat, ProResProfile, StillIm
|
|
|
2
2
|
import type { RenderJob } from '../../../preview-server/render-queue/job';
|
|
3
3
|
import type { RequiredChromiumOptions } from '../../../required-chromium-options';
|
|
4
4
|
import type { EnumPath } from '../RenderModal/SchemaEditor/extract-enum-json-paths';
|
|
5
|
-
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }: {
|
|
5
|
+
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, multiProcessOnLinux, }: {
|
|
6
6
|
compositionId: string;
|
|
7
7
|
outName: string;
|
|
8
8
|
imageFormat: StillImageFormat;
|
|
@@ -15,8 +15,9 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
15
15
|
envVariables: Record<string, string>;
|
|
16
16
|
inputProps: Record<string, unknown>;
|
|
17
17
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
18
|
+
multiProcessOnLinux: boolean;
|
|
18
19
|
}) => Promise<undefined>;
|
|
19
|
-
export declare const addSequenceRenderJob: ({ compositionId, outName, imageFormat, startFrame, endFrame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, concurrency, offthreadVideoCacheSizeInBytes, jpegQuality, disallowParallelEncoding, }: {
|
|
20
|
+
export declare const addSequenceRenderJob: ({ compositionId, outName, imageFormat, startFrame, endFrame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, concurrency, offthreadVideoCacheSizeInBytes, jpegQuality, disallowParallelEncoding, multiProcessOnLinux, }: {
|
|
20
21
|
compositionId: string;
|
|
21
22
|
outName: string;
|
|
22
23
|
imageFormat: VideoImageFormat;
|
|
@@ -32,8 +33,9 @@ export declare const addSequenceRenderJob: ({ compositionId, outName, imageForma
|
|
|
32
33
|
inputProps: Record<string, unknown>;
|
|
33
34
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
34
35
|
disallowParallelEncoding: boolean;
|
|
36
|
+
multiProcessOnLinux: boolean;
|
|
35
37
|
}) => Promise<undefined>;
|
|
36
|
-
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, }: {
|
|
38
|
+
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, }: {
|
|
37
39
|
compositionId: string;
|
|
38
40
|
outName: string;
|
|
39
41
|
imageFormat: VideoImageFormat;
|
|
@@ -62,6 +64,7 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
62
64
|
inputProps: Record<string, unknown>;
|
|
63
65
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
64
66
|
colorSpace: ColorSpace;
|
|
67
|
+
multiProcessOnLinux: boolean;
|
|
65
68
|
}) => Promise<undefined>;
|
|
66
69
|
export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
|
|
67
70
|
file: string;
|
|
@@ -26,7 +26,7 @@ const callApi = (endpoint, body, signal) => {
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }) => {
|
|
29
|
+
const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, multiProcessOnLinux, }) => {
|
|
30
30
|
return callApi('/api/render', {
|
|
31
31
|
compositionId,
|
|
32
32
|
type: 'still',
|
|
@@ -45,10 +45,11 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
|
|
|
45
45
|
indent: undefined,
|
|
46
46
|
}).serializedString,
|
|
47
47
|
offthreadVideoCacheSizeInBytes,
|
|
48
|
+
multiProcessOnLinux,
|
|
48
49
|
});
|
|
49
50
|
};
|
|
50
51
|
exports.addStillRenderJob = addStillRenderJob;
|
|
51
|
-
const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame, endFrame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, concurrency, offthreadVideoCacheSizeInBytes, jpegQuality, disallowParallelEncoding, }) => {
|
|
52
|
+
const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame, endFrame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, concurrency, offthreadVideoCacheSizeInBytes, jpegQuality, disallowParallelEncoding, multiProcessOnLinux, }) => {
|
|
52
53
|
return callApi('/api/render', {
|
|
53
54
|
compositionId,
|
|
54
55
|
type: 'sequence',
|
|
@@ -70,10 +71,11 @@ const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame,
|
|
|
70
71
|
}).serializedString,
|
|
71
72
|
offthreadVideoCacheSizeInBytes,
|
|
72
73
|
disallowParallelEncoding,
|
|
74
|
+
multiProcessOnLinux,
|
|
73
75
|
});
|
|
74
76
|
};
|
|
75
77
|
exports.addSequenceRenderJob = addSequenceRenderJob;
|
|
76
|
-
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
78
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, }) => {
|
|
77
79
|
return callApi('/api/render', {
|
|
78
80
|
compositionId,
|
|
79
81
|
type: 'video',
|
|
@@ -108,6 +110,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
108
110
|
}).serializedString,
|
|
109
111
|
offthreadVideoCacheSizeInBytes,
|
|
110
112
|
colorSpace,
|
|
113
|
+
multiProcessOnLinux,
|
|
111
114
|
});
|
|
112
115
|
};
|
|
113
116
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.RenderQueue = void 0;
|
|
4
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
6
29
|
const client_id_1 = require("../../helpers/client-id");
|
|
7
30
|
const colors_1 = require("../../helpers/colors");
|
|
8
31
|
const layout_1 = require("../layout");
|
|
@@ -36,14 +59,29 @@ const renderQueue = {
|
|
|
36
59
|
const RenderQueue = () => {
|
|
37
60
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type;
|
|
38
61
|
const { jobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
62
|
+
const previousJobCount = react_1.default.useRef(jobs.length);
|
|
39
63
|
const jobCount = jobs.length;
|
|
64
|
+
const divRef = react_1.default.useRef(null);
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
if (!divRef.current) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// Scroll down to bottom of render queue if new jobs have been added
|
|
70
|
+
if (jobCount > previousJobCount.current) {
|
|
71
|
+
divRef.current.scrollTo({
|
|
72
|
+
top: divRef.current.scrollHeight,
|
|
73
|
+
behavior: 'smooth',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
previousJobCount.current = jobCount;
|
|
77
|
+
}, [jobCount]);
|
|
40
78
|
if (connectionStatus === 'disconnected') {
|
|
41
79
|
return ((0, jsx_runtime_1.jsxs)("div", { style: explainer, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 5 }), (0, jsx_runtime_1.jsx)("div", { style: errorExplanation, children: "The studio server has disconnected." }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 2, block: true })] }));
|
|
42
80
|
}
|
|
43
81
|
if (jobCount === 0) {
|
|
44
82
|
return ((0, jsx_runtime_1.jsxs)("div", { style: explainer, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 5 }), (0, jsx_runtime_1.jsx)("div", { style: errorExplanation, children: "No renders in the queue." }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 2, block: true })] }));
|
|
45
83
|
}
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: renderQueue, className: ['css-reset', is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME].join(' '), children: jobs.map((j, index) => {
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: divRef, style: renderQueue, className: ['css-reset', is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME].join(' '), children: jobs.map((j, index) => {
|
|
47
85
|
return ((0, jsx_runtime_1.jsx)("div", { style: index === jobs.length - 1 ? undefined : separatorStyle, children: (0, jsx_runtime_1.jsx)(RenderQueueItem_1.RenderQueueItem, { job: j }) }, j.id));
|
|
48
86
|
}) }));
|
|
49
87
|
};
|