@remotion/renderer 4.0.505 → 4.0.507
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/client.d.ts +18 -0
- package/dist/client.js +3 -1
- package/dist/esm/client.mjs +722 -666
- package/dist/esm/index.mjs +30 -12
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/options/default-coding-agent.d.ts +18 -0
- package/dist/options/default-coding-agent.js +48 -0
- package/dist/options/index.d.ts +16 -0
- package/dist/options/index.js +2 -0
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +19 -6
- package/dist/render-still.d.ts +13 -6
- package/dist/render-still.js +20 -5
- package/package.json +13 -13
package/dist/esm/index.mjs
CHANGED
|
@@ -24245,7 +24245,7 @@ var internalRenderMediaRaw = ({
|
|
|
24245
24245
|
event: "cloud-render",
|
|
24246
24246
|
host: null,
|
|
24247
24247
|
succeeded: true,
|
|
24248
|
-
licenseKey: licenseKey
|
|
24248
|
+
licenseKey: licenseKey === "free-license" ? null : licenseKey,
|
|
24249
24249
|
isProduction: isProduction ?? true,
|
|
24250
24250
|
isStill: false
|
|
24251
24251
|
}).then(() => {
|
|
@@ -24373,8 +24373,12 @@ var renderMedia = ({
|
|
|
24373
24373
|
if (quality !== undefined) {
|
|
24374
24374
|
Log.warn({ indent, logLevel }, `The "quality" option has been renamed. Please use "jpegQuality" instead.`);
|
|
24375
24375
|
}
|
|
24376
|
-
const licenseKey = "licenseKey" in apiKeyOrLicenseKey ? apiKeyOrLicenseKey.licenseKey : null;
|
|
24377
|
-
const apiKey = "apiKey" in apiKeyOrLicenseKey ? apiKeyOrLicenseKey.apiKey : null;
|
|
24376
|
+
const licenseKey = "licenseKey" in apiKeyOrLicenseKey && typeof apiKeyOrLicenseKey.licenseKey === "string" ? apiKeyOrLicenseKey.licenseKey : null;
|
|
24377
|
+
const apiKey = "apiKey" in apiKeyOrLicenseKey && typeof apiKeyOrLicenseKey.apiKey === "string" ? apiKeyOrLicenseKey.apiKey : null;
|
|
24378
|
+
const effectiveLicenseKey = (NoReactInternals17.ENABLE_V5_BREAKING_CHANGES ? licenseKey : licenseKey ?? apiKey) ?? null;
|
|
24379
|
+
if (NoReactInternals17.ENABLE_V5_BREAKING_CHANGES && effectiveLicenseKey === null) {
|
|
24380
|
+
Log.warn({ indent, logLevel }, 'Pass "licenseKey" to renderMedia(). If you qualify for the Free License (https://remotion.dev/license), pass "free-license" instead.');
|
|
24381
|
+
}
|
|
24378
24382
|
return internalRenderMedia({
|
|
24379
24383
|
proResProfile: proResProfile ?? undefined,
|
|
24380
24384
|
x264Preset: x264Preset ?? null,
|
|
@@ -24454,7 +24458,7 @@ var renderMedia = ({
|
|
|
24454
24458
|
hardwareAcceleration: hardwareAcceleration ?? "disable",
|
|
24455
24459
|
chromeMode: chromeMode ?? "headless-shell",
|
|
24456
24460
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
|
|
24457
|
-
licenseKey:
|
|
24461
|
+
licenseKey: effectiveLicenseKey,
|
|
24458
24462
|
onLog: defaultOnLog,
|
|
24459
24463
|
isProduction: isProduction ?? null,
|
|
24460
24464
|
sampleRate: sampleRate ?? composition.defaultSampleRate ?? 48000
|
|
@@ -24712,7 +24716,7 @@ var internalRenderStillRaw = (options2) => {
|
|
|
24712
24716
|
return;
|
|
24713
24717
|
}
|
|
24714
24718
|
LicensingInternals2.internalRegisterUsageEvent({
|
|
24715
|
-
licenseKey: options2.licenseKey,
|
|
24719
|
+
licenseKey: options2.licenseKey === "free-license" ? null : options2.licenseKey,
|
|
24716
24720
|
event: "cloud-render",
|
|
24717
24721
|
host: null,
|
|
24718
24722
|
succeeded: true,
|
|
@@ -24775,9 +24779,8 @@ var renderStill = (options2) => {
|
|
|
24775
24779
|
chromeMode,
|
|
24776
24780
|
offthreadVideoThreads,
|
|
24777
24781
|
mediaCacheSizeInBytes,
|
|
24778
|
-
|
|
24779
|
-
|
|
24780
|
-
isProduction
|
|
24782
|
+
isProduction,
|
|
24783
|
+
...apiKeyOrLicenseKey
|
|
24781
24784
|
} = options2;
|
|
24782
24785
|
if (typeof jpegQuality !== "undefined" && imageFormat !== "jpeg") {
|
|
24783
24786
|
throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
|
|
@@ -24787,6 +24790,12 @@ var renderStill = (options2) => {
|
|
|
24787
24790
|
if (quality) {
|
|
24788
24791
|
Log.warn({ indent, logLevel }, "Passing `quality()` to `renderStill` is deprecated. Use `jpegQuality` instead.");
|
|
24789
24792
|
}
|
|
24793
|
+
const licenseKey = "licenseKey" in apiKeyOrLicenseKey && typeof apiKeyOrLicenseKey.licenseKey === "string" ? apiKeyOrLicenseKey.licenseKey : null;
|
|
24794
|
+
const apiKey = "apiKey" in apiKeyOrLicenseKey && typeof apiKeyOrLicenseKey.apiKey === "string" ? apiKeyOrLicenseKey.apiKey : null;
|
|
24795
|
+
const effectiveLicenseKey = (NoReactInternals18.ENABLE_V5_BREAKING_CHANGES ? licenseKey : licenseKey ?? apiKey) ?? null;
|
|
24796
|
+
if (NoReactInternals18.ENABLE_V5_BREAKING_CHANGES && effectiveLicenseKey === null) {
|
|
24797
|
+
Log.warn({ indent, logLevel }, 'Pass "licenseKey" to renderStill(). If you qualify for the Free License (https://remotion.dev/license), pass "free-license" instead.');
|
|
24798
|
+
}
|
|
24790
24799
|
return internalRenderStill({
|
|
24791
24800
|
composition,
|
|
24792
24801
|
browserExecutable: browserExecutable ?? null,
|
|
@@ -24829,7 +24838,7 @@ var renderStill = (options2) => {
|
|
|
24829
24838
|
chromeMode: chromeMode ?? "headless-shell",
|
|
24830
24839
|
offthreadVideoThreads: offthreadVideoThreads ?? null,
|
|
24831
24840
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
|
|
24832
|
-
licenseKey:
|
|
24841
|
+
licenseKey: effectiveLicenseKey,
|
|
24833
24842
|
onLog: defaultOnLog,
|
|
24834
24843
|
isProduction: isProduction ?? null
|
|
24835
24844
|
});
|
|
@@ -25616,8 +25625,16 @@ var getVideoMetadata = async (videoSource, options2) => {
|
|
|
25616
25625
|
};
|
|
25617
25626
|
// src/options/chrome-mode.tsx
|
|
25618
25627
|
import { jsx as jsx7, jsxs as jsxs7, Fragment as Fragment7 } from "react/jsx-runtime";
|
|
25619
|
-
// src/options/default-
|
|
25628
|
+
// src/options/default-coding-agent.tsx
|
|
25620
25629
|
import { jsx as jsx8, jsxs as jsxs8, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
25630
|
+
var defaultCodingAgentIds = [
|
|
25631
|
+
"codex",
|
|
25632
|
+
"cursor",
|
|
25633
|
+
"copilot",
|
|
25634
|
+
"claude-code"
|
|
25635
|
+
];
|
|
25636
|
+
// src/options/default-editor.tsx
|
|
25637
|
+
import { jsx as jsx9, jsxs as jsxs9, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
25621
25638
|
var defaultEditorIds = [
|
|
25622
25639
|
"vscode",
|
|
25623
25640
|
"cursor",
|
|
@@ -25631,9 +25648,9 @@ var customEditorTargetPathPlaceholder = "%TARGET_PATH%";
|
|
|
25631
25648
|
var customEditorLineNumberPlaceholder = "%LINE_NUMBER%";
|
|
25632
25649
|
var customEditorColumnNumberPlaceholder = "%COLUMN_NUMBER%";
|
|
25633
25650
|
// src/options/number-of-gif-loops.tsx
|
|
25634
|
-
import { jsx as jsx9, jsxs as jsxs9, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
25635
|
-
// src/options/on-browser-download.tsx
|
|
25636
25651
|
import { jsx as jsx10, jsxs as jsxs10, Fragment as Fragment10 } from "react/jsx-runtime";
|
|
25652
|
+
// src/options/on-browser-download.tsx
|
|
25653
|
+
import { jsx as jsx11, jsxs as jsxs11, Fragment as Fragment11 } from "react/jsx-runtime";
|
|
25637
25654
|
// src/index.ts
|
|
25638
25655
|
var RenderInternals = {
|
|
25639
25656
|
resolveConcurrency,
|
|
@@ -25746,6 +25763,7 @@ export {
|
|
|
25746
25763
|
extractAudio,
|
|
25747
25764
|
ensureBrowser,
|
|
25748
25765
|
defaultEditorIds,
|
|
25766
|
+
defaultCodingAgentIds,
|
|
25749
25767
|
customEditorTargetPathPlaceholder,
|
|
25750
25768
|
customEditorLineNumberPlaceholder,
|
|
25751
25769
|
customEditorColumnNumberPlaceholder,
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { extractAudio } from './extract-audio';
|
|
|
19
19
|
export type { FfmpegOverrideFn } from './ffmpeg-override';
|
|
20
20
|
export { FileExtension } from './file-extensions';
|
|
21
21
|
export { FrameRange, FrameRangeTuple, FrameSelection, OpenEndedFrameRange, ResolvedFrameRange, SingleFrameRange, } from './frame-range';
|
|
22
|
-
export { GetCompositionsOptions,
|
|
22
|
+
export { GetCompositionsOptions, LegacyGetCompositionsOptions, getCompositions, } from './get-compositions';
|
|
23
23
|
export { SilentPart, getSilentParts } from './get-silent-parts';
|
|
24
24
|
export { VideoMetadata, getVideoMetadata } from './get-video-metadata';
|
|
25
25
|
export { ImageFormat, StillImageFormat, VideoImageFormat, validateSelectedPixelFormatAndImageFormatCombination, } from './image-format';
|
|
@@ -31,6 +31,8 @@ export type { ChromiumOptions } from './open-browser';
|
|
|
31
31
|
export { ChromeMode } from './options/chrome-mode';
|
|
32
32
|
export { ColorSpace } from './options/color-space';
|
|
33
33
|
export type { Concurrency } from './options/concurrency';
|
|
34
|
+
export { defaultCodingAgentIds } from './options/default-coding-agent';
|
|
35
|
+
export type { DefaultCodingAgent } from './options/default-coding-agent';
|
|
34
36
|
export { customEditorColumnNumberPlaceholder, customEditorLineNumberPlaceholder, customEditorTargetPathPlaceholder, defaultEditorIds, } from './options/default-editor';
|
|
35
37
|
export type { BuiltInEditor, CustomEditor, DefaultEditor, } from './options/default-editor';
|
|
36
38
|
export type { DeleteAfter } from './options/delete-after';
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.selectComposition = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.defaultEditorIds = exports.customEditorTargetPathPlaceholder = exports.customEditorLineNumberPlaceholder = exports.customEditorColumnNumberPlaceholder = exports.openBrowser = exports.makeCancelSignal = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getVideoMetadata = exports.getSilentParts = exports.getCompositions = exports.extractAudio = exports.ErrorWithStackFrame = exports.ensureBrowser = exports.combineChunks = void 0;
|
|
39
|
+
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.selectComposition = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.defaultEditorIds = exports.customEditorTargetPathPlaceholder = exports.customEditorLineNumberPlaceholder = exports.customEditorColumnNumberPlaceholder = exports.defaultCodingAgentIds = exports.openBrowser = exports.makeCancelSignal = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getVideoMetadata = exports.getSilentParts = exports.getCompositions = exports.extractAudio = exports.ErrorWithStackFrame = exports.ensureBrowser = exports.combineChunks = void 0;
|
|
40
40
|
const execa_1 = __importDefault(require("execa"));
|
|
41
41
|
const download_file_1 = require("./assets/download-file");
|
|
42
42
|
const browser_1 = require("./browser");
|
|
@@ -109,6 +109,8 @@ const make_cancel_signal_1 = require("./make-cancel-signal");
|
|
|
109
109
|
Object.defineProperty(exports, "makeCancelSignal", { enumerable: true, get: function () { return make_cancel_signal_1.makeCancelSignal; } });
|
|
110
110
|
const open_browser_2 = require("./open-browser");
|
|
111
111
|
Object.defineProperty(exports, "openBrowser", { enumerable: true, get: function () { return open_browser_2.openBrowser; } });
|
|
112
|
+
const default_coding_agent_1 = require("./options/default-coding-agent");
|
|
113
|
+
Object.defineProperty(exports, "defaultCodingAgentIds", { enumerable: true, get: function () { return default_coding_agent_1.defaultCodingAgentIds; } });
|
|
112
114
|
const default_editor_1 = require("./options/default-editor");
|
|
113
115
|
Object.defineProperty(exports, "customEditorColumnNumberPlaceholder", { enumerable: true, get: function () { return default_editor_1.customEditorColumnNumberPlaceholder; } });
|
|
114
116
|
Object.defineProperty(exports, "customEditorLineNumberPlaceholder", { enumerable: true, get: function () { return default_editor_1.customEditorLineNumberPlaceholder; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const defaultCodingAgentIds: readonly ["codex", "cursor", "copilot", "claude-code"];
|
|
2
|
+
export type DefaultCodingAgent = (typeof defaultCodingAgentIds)[number];
|
|
3
|
+
export declare const defaultCodingAgentOption: {
|
|
4
|
+
name: string;
|
|
5
|
+
cliFlag: "coding-agent";
|
|
6
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
ssrName: null;
|
|
8
|
+
docLink: string;
|
|
9
|
+
type: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
10
|
+
getValue: ({ commandLine }: {
|
|
11
|
+
commandLine: Record<string, unknown>;
|
|
12
|
+
}) => {
|
|
13
|
+
value: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
14
|
+
source: string;
|
|
15
|
+
};
|
|
16
|
+
setConfig(value: "claude-code" | "codex" | "copilot" | "cursor" | null): void;
|
|
17
|
+
id: "coding-agent";
|
|
18
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultCodingAgentOption = exports.defaultCodingAgentIds = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.defaultCodingAgentIds = [
|
|
6
|
+
'codex',
|
|
7
|
+
'cursor',
|
|
8
|
+
'copilot',
|
|
9
|
+
'claude-code',
|
|
10
|
+
];
|
|
11
|
+
const cliFlag = 'coding-agent';
|
|
12
|
+
let defaultCodingAgent = null;
|
|
13
|
+
const validateDefaultCodingAgent = (value, source) => {
|
|
14
|
+
if (value === null) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
if (typeof value !== 'string' ||
|
|
18
|
+
!exports.defaultCodingAgentIds.includes(value)) {
|
|
19
|
+
throw new TypeError(`${source} must be one of: ${exports.defaultCodingAgentIds.join(', ')}. Received: ${JSON.stringify(value)}`);
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
exports.defaultCodingAgentOption = {
|
|
24
|
+
name: 'Default coding agent',
|
|
25
|
+
cliFlag,
|
|
26
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Set the default coding agent for Remotion Studio. Available coding agents:", ' ', jsx_runtime_1.jsx("code", { children: exports.defaultCodingAgentIds.join(', ') }),
|
|
27
|
+
"."] })),
|
|
28
|
+
ssrName: null,
|
|
29
|
+
docLink: 'https://www.remotion.dev/docs/config#setdefaultcodingagent',
|
|
30
|
+
type: null,
|
|
31
|
+
getValue: ({ commandLine }) => {
|
|
32
|
+
const cliValue = commandLine[cliFlag];
|
|
33
|
+
if (cliValue !== undefined && cliValue !== null) {
|
|
34
|
+
return {
|
|
35
|
+
value: validateDefaultCodingAgent(cliValue, `--${cliFlag}`),
|
|
36
|
+
source: 'cli',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
value: defaultCodingAgent,
|
|
41
|
+
source: 'config',
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
setConfig(value) {
|
|
45
|
+
defaultCodingAgent = validateDefaultCodingAgent(value, 'Config.setDefaultCodingAgent()');
|
|
46
|
+
},
|
|
47
|
+
id: cliFlag,
|
|
48
|
+
};
|
package/dist/options/index.d.ts
CHANGED
|
@@ -1032,6 +1032,22 @@ export declare const allOptions: {
|
|
|
1032
1032
|
setConfig: (value: boolean) => void;
|
|
1033
1033
|
id: "dark-mode";
|
|
1034
1034
|
};
|
|
1035
|
+
defaultCodingAgentOption: {
|
|
1036
|
+
name: string;
|
|
1037
|
+
cliFlag: "coding-agent";
|
|
1038
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1039
|
+
ssrName: null;
|
|
1040
|
+
docLink: string;
|
|
1041
|
+
type: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
1042
|
+
getValue: ({ commandLine }: {
|
|
1043
|
+
commandLine: Record<string, unknown>;
|
|
1044
|
+
}) => {
|
|
1045
|
+
value: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
1046
|
+
source: string;
|
|
1047
|
+
};
|
|
1048
|
+
setConfig(value: "claude-code" | "codex" | "copilot" | "cursor" | null): void;
|
|
1049
|
+
id: "coding-agent";
|
|
1050
|
+
};
|
|
1035
1051
|
defaultEditorOption: {
|
|
1036
1052
|
name: string;
|
|
1037
1053
|
cliFlag: "editor";
|
package/dist/options/index.js
CHANGED
|
@@ -18,6 +18,7 @@ const config_1 = require("./config");
|
|
|
18
18
|
const crf_1 = require("./crf");
|
|
19
19
|
const cross_site_isolation_1 = require("./cross-site-isolation");
|
|
20
20
|
const dark_mode_1 = require("./dark-mode");
|
|
21
|
+
const default_coding_agent_1 = require("./default-coding-agent");
|
|
21
22
|
const default_editor_1 = require("./default-editor");
|
|
22
23
|
const delete_after_1 = require("./delete-after");
|
|
23
24
|
const disable_git_source_1 = require("./disable-git-source");
|
|
@@ -154,6 +155,7 @@ exports.allOptions = {
|
|
|
154
155
|
imageSequencePatternOption: image_sequence_pattern_1.imageSequencePatternOption,
|
|
155
156
|
mediaCacheSizeInBytesOption: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
156
157
|
darkModeOption: dark_mode_1.darkModeOption,
|
|
158
|
+
defaultCodingAgentOption: default_coding_agent_1.defaultCodingAgentOption,
|
|
157
159
|
defaultEditorOption: default_editor_1.defaultEditorOption,
|
|
158
160
|
publicLicenseKeyOption: public_license_key_1.publicLicenseKeyOption,
|
|
159
161
|
isProductionOption: is_production_1.isProductionOption,
|
package/dist/render-media.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export type RenderMediaProgress = {
|
|
|
37
37
|
export type RenderMediaOnProgress = (progress: RenderMediaProgress) => void;
|
|
38
38
|
type MoreRenderMediaOptions = ToOptions<typeof optionsMap.renderMedia>;
|
|
39
39
|
type EitherApiKeyOrLicenseKey = true extends typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? {
|
|
40
|
-
licenseKey
|
|
40
|
+
licenseKey?: string | null;
|
|
41
41
|
} : {
|
|
42
42
|
/**
|
|
43
43
|
* @deprecated Use `licenseKey` instead
|
package/dist/render-media.js
CHANGED
|
@@ -494,7 +494,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, gopSize, crf, compo
|
|
|
494
494
|
event: 'cloud-render',
|
|
495
495
|
host: null,
|
|
496
496
|
succeeded: true,
|
|
497
|
-
licenseKey: licenseKey
|
|
497
|
+
licenseKey: licenseKey === 'free-license' ? null : licenseKey,
|
|
498
498
|
isProduction: isProduction !== null && isProduction !== void 0 ? isProduction : true,
|
|
499
499
|
isStill: false,
|
|
500
500
|
})
|
|
@@ -588,8 +588,21 @@ const renderMedia = ({ proResProfile, x264Preset, gopSize, crf, composition, inp
|
|
|
588
588
|
if (quality !== undefined) {
|
|
589
589
|
logger_1.Log.warn({ indent, logLevel }, `The "quality" option has been renamed. Please use "jpegQuality" instead.`);
|
|
590
590
|
}
|
|
591
|
-
const licenseKey = 'licenseKey' in apiKeyOrLicenseKey
|
|
592
|
-
|
|
591
|
+
const licenseKey = 'licenseKey' in apiKeyOrLicenseKey &&
|
|
592
|
+
typeof apiKeyOrLicenseKey.licenseKey === 'string'
|
|
593
|
+
? apiKeyOrLicenseKey.licenseKey
|
|
594
|
+
: null;
|
|
595
|
+
const apiKey = 'apiKey' in apiKeyOrLicenseKey &&
|
|
596
|
+
typeof apiKeyOrLicenseKey.apiKey === 'string'
|
|
597
|
+
? apiKeyOrLicenseKey.apiKey
|
|
598
|
+
: null;
|
|
599
|
+
const effectiveLicenseKey = (_a = (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
600
|
+
? licenseKey
|
|
601
|
+
: (licenseKey !== null && licenseKey !== void 0 ? licenseKey : apiKey))) !== null && _a !== void 0 ? _a : null;
|
|
602
|
+
if (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES &&
|
|
603
|
+
effectiveLicenseKey === null) {
|
|
604
|
+
logger_1.Log.warn({ indent, logLevel }, 'Pass "licenseKey" to renderMedia(). If you qualify for the Free License (https://remotion.dev/license), pass "free-license" instead.');
|
|
605
|
+
}
|
|
593
606
|
return (0, exports.internalRenderMedia)({
|
|
594
607
|
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
|
|
595
608
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
@@ -616,7 +629,7 @@ const renderMedia = ({ proResProfile, x264Preset, gopSize, crf, composition, inp
|
|
|
616
629
|
staticBase: null,
|
|
617
630
|
data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
618
631
|
}).serializedString,
|
|
619
|
-
jpegQuality: (
|
|
632
|
+
jpegQuality: (_b = jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : quality) !== null && _b !== void 0 ? _b : jpeg_quality_1.DEFAULT_JPEG_QUALITY,
|
|
620
633
|
muted: muted !== null && muted !== void 0 ? muted : false,
|
|
621
634
|
numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : null,
|
|
622
635
|
onBrowserLog: onBrowserLog !== null && onBrowserLog !== void 0 ? onBrowserLog : null,
|
|
@@ -641,7 +654,7 @@ const renderMedia = ({ proResProfile, x264Preset, gopSize, crf, composition, inp
|
|
|
641
654
|
serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
|
|
642
655
|
indent: undefined,
|
|
643
656
|
staticBase: null,
|
|
644
|
-
data: (
|
|
657
|
+
data: (_c = composition.props) !== null && _c !== void 0 ? _c : {},
|
|
645
658
|
}).serializedString,
|
|
646
659
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
647
660
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
@@ -661,7 +674,7 @@ const renderMedia = ({ proResProfile, x264Preset, gopSize, crf, composition, inp
|
|
|
661
674
|
hardwareAcceleration: hardwareAcceleration !== null && hardwareAcceleration !== void 0 ? hardwareAcceleration : 'disable',
|
|
662
675
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
663
676
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
664
|
-
licenseKey:
|
|
677
|
+
licenseKey: effectiveLicenseKey,
|
|
665
678
|
onLog: default_on_log_1.defaultOnLog,
|
|
666
679
|
isProduction: isProduction !== null && isProduction !== void 0 ? isProduction : null,
|
|
667
680
|
sampleRate: (_d = sampleRate !== null && sampleRate !== void 0 ? sampleRate : composition.defaultSampleRate) !== null && _d !== void 0 ? _d : 48000,
|
package/dist/render-still.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VideoConfig } from 'remotion/no-react';
|
|
2
|
+
import { NoReactInternals } from 'remotion/no-react';
|
|
2
3
|
import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
|
|
3
4
|
import type { BrowserExecutable } from './browser-executable';
|
|
4
5
|
import type { BrowserLog } from './browser-log';
|
|
@@ -36,6 +37,17 @@ type InternalRenderStillOptions = {
|
|
|
36
37
|
onLog: OnLog;
|
|
37
38
|
isProduction: boolean | null;
|
|
38
39
|
} & ToOptions<Omit<typeof optionsMap.renderStill, 'apiKey'>>;
|
|
40
|
+
type MoreRenderStillOptions = ToOptions<Omit<typeof optionsMap.renderStill, 'apiKey' | 'licenseKey'>>;
|
|
41
|
+
type EitherApiKeyOrLicenseKey = true extends typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? {
|
|
42
|
+
licenseKey?: string | null;
|
|
43
|
+
} : {
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `licenseKey` instead
|
|
46
|
+
*/
|
|
47
|
+
apiKey?: string | null;
|
|
48
|
+
} | {
|
|
49
|
+
licenseKey?: string | null;
|
|
50
|
+
};
|
|
39
51
|
export type RenderStillOptions = {
|
|
40
52
|
port?: number | null;
|
|
41
53
|
composition: VideoConfig;
|
|
@@ -67,12 +79,7 @@ export type RenderStillOptions = {
|
|
|
67
79
|
quality?: never;
|
|
68
80
|
onArtifact?: OnArtifact;
|
|
69
81
|
isProduction?: boolean;
|
|
70
|
-
} & Partial<
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Use `licenseKey` instead
|
|
73
|
-
*/
|
|
74
|
-
apiKey?: string | null;
|
|
75
|
-
};
|
|
82
|
+
} & Partial<MoreRenderStillOptions> & EitherApiKeyOrLicenseKey;
|
|
76
83
|
type RenderStillReturnValue = {
|
|
77
84
|
buffer: Buffer | null;
|
|
78
85
|
contentType: string;
|
package/dist/render-still.js
CHANGED
|
@@ -292,7 +292,7 @@ const internalRenderStillRaw = (options) => {
|
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
294
|
licensing_1.LicensingInternals.internalRegisterUsageEvent({
|
|
295
|
-
licenseKey: options.licenseKey,
|
|
295
|
+
licenseKey: options.licenseKey === 'free-license' ? null : options.licenseKey,
|
|
296
296
|
event: 'cloud-render',
|
|
297
297
|
host: null,
|
|
298
298
|
succeeded: true,
|
|
@@ -336,7 +336,7 @@ exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
336
336
|
*/
|
|
337
337
|
const renderStill = (options) => {
|
|
338
338
|
var _a, _b, _c;
|
|
339
|
-
const { composition, serveUrl, browserExecutable, cancelSignal, chromiumOptions, dumpBrowserLogs, envVariables, frame, imageFormat, inputProps, jpegQuality, onBrowserLog, onDownload, output, overwrite, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, offthreadVideoCacheSizeInBytes, logLevel: passedLogLevel, binariesDirectory, onBrowserDownload, onArtifact, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes,
|
|
339
|
+
const { composition, serveUrl, browserExecutable, cancelSignal, chromiumOptions, dumpBrowserLogs, envVariables, frame, imageFormat, inputProps, jpegQuality, onBrowserLog, onDownload, output, overwrite, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, offthreadVideoCacheSizeInBytes, logLevel: passedLogLevel, binariesDirectory, onBrowserDownload, onArtifact, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, isProduction, ...apiKeyOrLicenseKey } = options;
|
|
340
340
|
if (typeof jpegQuality !== 'undefined' && imageFormat !== 'jpeg') {
|
|
341
341
|
throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
|
|
342
342
|
}
|
|
@@ -345,6 +345,21 @@ const renderStill = (options) => {
|
|
|
345
345
|
if (quality) {
|
|
346
346
|
logger_1.Log.warn({ indent, logLevel }, 'Passing `quality()` to `renderStill` is deprecated. Use `jpegQuality` instead.');
|
|
347
347
|
}
|
|
348
|
+
const licenseKey = 'licenseKey' in apiKeyOrLicenseKey &&
|
|
349
|
+
typeof apiKeyOrLicenseKey.licenseKey === 'string'
|
|
350
|
+
? apiKeyOrLicenseKey.licenseKey
|
|
351
|
+
: null;
|
|
352
|
+
const apiKey = 'apiKey' in apiKeyOrLicenseKey &&
|
|
353
|
+
typeof apiKeyOrLicenseKey.apiKey === 'string'
|
|
354
|
+
? apiKeyOrLicenseKey.apiKey
|
|
355
|
+
: null;
|
|
356
|
+
const effectiveLicenseKey = (_a = (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
|
|
357
|
+
? licenseKey
|
|
358
|
+
: (licenseKey !== null && licenseKey !== void 0 ? licenseKey : apiKey))) !== null && _a !== void 0 ? _a : null;
|
|
359
|
+
if (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES &&
|
|
360
|
+
effectiveLicenseKey === null) {
|
|
361
|
+
logger_1.Log.warn({ indent, logLevel }, 'Pass "licenseKey" to renderStill(). If you qualify for the Free License (https://remotion.dev/license), pass "free-license" instead.');
|
|
362
|
+
}
|
|
348
363
|
return (0, exports.internalRenderStill)({
|
|
349
364
|
composition,
|
|
350
365
|
browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
|
|
@@ -359,7 +374,7 @@ const renderStill = (options) => {
|
|
|
359
374
|
indent: undefined,
|
|
360
375
|
data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
361
376
|
}).serializedString,
|
|
362
|
-
jpegQuality: (
|
|
377
|
+
jpegQuality: (_b = jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : quality) !== null && _b !== void 0 ? _b : jpeg_quality_1.DEFAULT_JPEG_QUALITY,
|
|
363
378
|
onBrowserLog: onBrowserLog !== null && onBrowserLog !== void 0 ? onBrowserLog : null,
|
|
364
379
|
onDownload: onDownload !== null && onDownload !== void 0 ? onDownload : null,
|
|
365
380
|
output: output !== null && output !== void 0 ? output : null,
|
|
@@ -374,7 +389,7 @@ const renderStill = (options) => {
|
|
|
374
389
|
serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
|
|
375
390
|
indent: undefined,
|
|
376
391
|
staticBase: null,
|
|
377
|
-
data: (
|
|
392
|
+
data: (_c = composition.props) !== null && _c !== void 0 ? _c : {},
|
|
378
393
|
}).serializedString,
|
|
379
394
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
380
395
|
binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
|
|
@@ -387,7 +402,7 @@ const renderStill = (options) => {
|
|
|
387
402
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
388
403
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
389
404
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
390
|
-
licenseKey:
|
|
405
|
+
licenseKey: effectiveLicenseKey,
|
|
391
406
|
onLog: default_on_log_1.defaultOnLog,
|
|
392
407
|
isProduction: isProduction !== null && isProduction !== void 0 ? isProduction : null,
|
|
393
408
|
});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.507",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "5.1.1",
|
|
25
|
-
"remotion": "4.0.
|
|
26
|
-
"@remotion/streaming": "4.0.
|
|
25
|
+
"remotion": "4.0.507",
|
|
26
|
+
"@remotion/streaming": "4.0.507",
|
|
27
27
|
"source-map": "0.8.0",
|
|
28
28
|
"ws": "8.21.0",
|
|
29
|
-
"@remotion/licensing": "4.0.
|
|
29
|
+
"@remotion/licensing": "4.0.507"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=16.8.0",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"react-dom": "19.2.3",
|
|
41
41
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
42
42
|
"@types/ws": "8.5.10",
|
|
43
|
-
"@remotion/example-videos": "4.0.
|
|
44
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
43
|
+
"@remotion/example-videos": "4.0.507",
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.507",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@types/node": "20.12.14"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
50
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
51
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
55
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
49
|
+
"@remotion/compositor-darwin-arm64": "4.0.507",
|
|
50
|
+
"@remotion/compositor-darwin-x64": "4.0.507",
|
|
51
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.507",
|
|
52
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.507",
|
|
53
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.507",
|
|
54
|
+
"@remotion/compositor-linux-x64-musl": "4.0.507",
|
|
55
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.507"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
58
58
|
"remotion",
|