@remotion/renderer 4.0.398 → 4.0.400

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.
@@ -4850,7 +4850,8 @@ var downloadBrowser = async ({
4850
4850
  onProgress({
4851
4851
  downloadedBytes: progress.downloaded,
4852
4852
  totalSizeInBytes: progress.totalSize,
4853
- percent: progress.percent
4853
+ percent: progress.percent,
4854
+ alreadyAvailable: false
4854
4855
  });
4855
4856
  },
4856
4857
  indent,
@@ -21456,7 +21457,7 @@ var internalRenderMediaRaw = ({
21456
21457
  offthreadVideoThreads,
21457
21458
  mediaCacheSizeInBytes,
21458
21459
  onLog,
21459
- apiKey
21460
+ licenseKey
21460
21461
  }) => {
21461
21462
  const pixelFormat = userPixelFormat ?? compositionWithPossibleUnevenDimensions.defaultPixelFormat ?? DEFAULT_PIXEL_FORMAT;
21462
21463
  if (repro) {
@@ -21840,15 +21841,15 @@ var internalRenderMediaRaw = ({
21840
21841
  slowestFrames
21841
21842
  };
21842
21843
  const sendTelemetryAndResolve = () => {
21843
- if (apiKey === null) {
21844
+ if (licenseKey === null) {
21844
21845
  resolve2(result);
21845
21846
  return;
21846
21847
  }
21847
21848
  registerUsageEvent({
21848
- apiKey,
21849
21849
  event: "cloud-render",
21850
21850
  host: null,
21851
- succeeded: true
21851
+ succeeded: true,
21852
+ licenseKey: licenseKey ?? null
21852
21853
  }).then(() => {
21853
21854
  Log.verbose({ indent, logLevel }, "Usage event sent successfully");
21854
21855
  }).catch((err) => {
@@ -21964,13 +21965,15 @@ var renderMedia = ({
21964
21965
  offthreadVideoThreads,
21965
21966
  compositionStart,
21966
21967
  mediaCacheSizeInBytes,
21967
- apiKey
21968
+ ...apiKeyOrLicenseKey
21968
21969
  }) => {
21969
21970
  const indent = false;
21970
21971
  const logLevel = verbose || dumpBrowserLogs ? "verbose" : passedLogLevel ?? "info";
21971
21972
  if (quality !== undefined) {
21972
21973
  Log.warn({ indent, logLevel }, `The "quality" option has been renamed. Please use "jpegQuality" instead.`);
21973
21974
  }
21975
+ const licenseKey = "licenseKey" in apiKeyOrLicenseKey ? apiKeyOrLicenseKey.licenseKey : null;
21976
+ const apiKey = "apiKey" in apiKeyOrLicenseKey ? apiKeyOrLicenseKey.apiKey : null;
21974
21977
  return internalRenderMedia({
21975
21978
  proResProfile: proResProfile ?? undefined,
21976
21979
  x264Preset: x264Preset ?? null,
@@ -22049,7 +22052,7 @@ var renderMedia = ({
22049
22052
  hardwareAcceleration: hardwareAcceleration ?? "disable",
22050
22053
  chromeMode: chromeMode ?? "headless-shell",
22051
22054
  mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
22052
- apiKey: apiKey ?? null,
22055
+ licenseKey: licenseKey ?? apiKey ?? null,
22053
22056
  onLog: defaultOnLog
22054
22057
  });
22055
22058
  };
@@ -22298,7 +22301,7 @@ var internalRenderStillRaw = (options) => {
22298
22301
  return;
22299
22302
  }
22300
22303
  registerUsageEvent2({
22301
- apiKey: options.apiKey,
22304
+ licenseKey: options.licenseKey ?? options.apiKey ?? null,
22302
22305
  event: "cloud-render",
22303
22306
  host: null,
22304
22307
  succeeded: true
@@ -22359,7 +22362,8 @@ var renderStill = (options) => {
22359
22362
  chromeMode,
22360
22363
  offthreadVideoThreads,
22361
22364
  mediaCacheSizeInBytes,
22362
- apiKey
22365
+ apiKey,
22366
+ licenseKey
22363
22367
  } = options;
22364
22368
  if (typeof jpegQuality !== "undefined" && imageFormat !== "jpeg") {
22365
22369
  throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
@@ -22412,6 +22416,7 @@ var renderStill = (options) => {
22412
22416
  offthreadVideoThreads: offthreadVideoThreads ?? null,
22413
22417
  mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
22414
22418
  apiKey: apiKey ?? null,
22419
+ licenseKey: licenseKey ?? null,
22415
22420
  onLog: defaultOnLog
22416
22421
  });
22417
22422
  };
package/dist/index.d.ts CHANGED
@@ -615,6 +615,21 @@ export declare const RenderInternals: {
615
615
  };
616
616
  setConfig: (value: string | null) => void;
617
617
  };
618
+ readonly licenseKey: {
619
+ name: string;
620
+ cliFlag: "licenseKey-key";
621
+ description: () => import("react/jsx-runtime").JSX.Element;
622
+ ssrName: "licenseKey";
623
+ docLink: string;
624
+ type: string | null;
625
+ getValue: ({ commandLine }: {
626
+ commandLine: Record<string, unknown>;
627
+ }) => {
628
+ source: string;
629
+ value: string | null;
630
+ };
631
+ setConfig: (value: string | null) => void;
632
+ };
618
633
  }>) => Promise<{
619
634
  buffer: Buffer | null;
620
635
  }>;
@@ -676,6 +676,21 @@ export declare const allOptions: {
676
676
  };
677
677
  setConfig: (value: string | null) => void;
678
678
  };
679
+ licenseKeyOption: {
680
+ name: string;
681
+ cliFlag: "licenseKey-key";
682
+ description: () => import("react/jsx-runtime").JSX.Element;
683
+ ssrName: "licenseKey";
684
+ docLink: string;
685
+ type: string | null;
686
+ getValue: ({ commandLine }: {
687
+ commandLine: Record<string, unknown>;
688
+ }) => {
689
+ source: string;
690
+ value: string | null;
691
+ };
692
+ setConfig: (value: string | null) => void;
693
+ };
679
694
  audioLatencyHintOption: {
680
695
  name: string;
681
696
  cliFlag: "audio-latency-hint";
@@ -27,6 +27,7 @@ const headless_1 = require("./headless");
27
27
  const image_sequence_pattern_1 = require("./image-sequence-pattern");
28
28
  const jpeg_quality_1 = require("./jpeg-quality");
29
29
  const latency_hint_1 = require("./latency-hint");
30
+ const license_key_1 = require("./license-key");
30
31
  const log_level_1 = require("./log-level");
31
32
  const metadata_1 = require("./metadata");
32
33
  const mute_1 = require("./mute");
@@ -92,6 +93,7 @@ exports.allOptions = {
92
93
  hardwareAccelerationOption: hardware_acceleration_1.hardwareAccelerationOption,
93
94
  chromeModeOption: chrome_mode_1.chromeModeOption,
94
95
  apiKeyOption: api_key_1.apiKeyOption,
96
+ licenseKeyOption: license_key_1.licenseKeyOption,
95
97
  audioLatencyHintOption: latency_hint_1.audioLatencyHintOption,
96
98
  enableCrossSiteIsolationOption: cross_site_isolation_1.enableCrossSiteIsolationOption,
97
99
  imageSequencePatternOption: image_sequence_pattern_1.imageSequencePatternOption,
@@ -0,0 +1,15 @@
1
+ export declare const licenseKeyOption: {
2
+ name: string;
3
+ cliFlag: "licenseKey-key";
4
+ description: () => import("react/jsx-runtime").JSX.Element;
5
+ ssrName: "licenseKey";
6
+ docLink: string;
7
+ type: string | null;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ source: string;
12
+ value: string | null;
13
+ };
14
+ setConfig: (value: string | null) => void;
15
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.licenseKeyOption = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ let currentLicenseKey = null;
6
+ const cliFlag = 'licenseKey-key';
7
+ exports.licenseKeyOption = {
8
+ name: 'License key',
9
+ cliFlag,
10
+ description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["License key for sending a usage event using", ' ', (0, jsx_runtime_1.jsx)("code", { children: "@remotion/licensing" }), "."] })),
11
+ ssrName: 'licenseKey',
12
+ docLink: 'https://www.remotion.dev/docs/licensing',
13
+ type: null,
14
+ getValue: ({ commandLine }) => {
15
+ if (commandLine[cliFlag] !== undefined) {
16
+ return {
17
+ source: 'cli',
18
+ value: commandLine[cliFlag],
19
+ };
20
+ }
21
+ return {
22
+ source: 'default',
23
+ value: currentLicenseKey,
24
+ };
25
+ },
26
+ setConfig: (value) => {
27
+ currentLicenseKey = value;
28
+ },
29
+ };
@@ -1,5 +1,6 @@
1
1
  import type { ChromeMode } from './chrome-mode';
2
2
  export type DownloadBrowserProgressFn = (progress: {
3
+ alreadyAvailable: boolean;
3
4
  percent: number;
4
5
  downloadedBytes: number;
5
6
  totalSizeInBytes: number;
@@ -394,11 +394,11 @@ export declare const optionsMap: {
394
394
  setConfig: (newChromeMode: import("./chrome-mode").ChromeMode) => void;
395
395
  type: import("./chrome-mode").ChromeMode;
396
396
  };
397
- readonly apiKey: {
397
+ readonly licenseKey: {
398
398
  name: string;
399
- cliFlag: "api-key";
399
+ cliFlag: "licenseKey-key";
400
400
  description: () => import("react/jsx-runtime").JSX.Element;
401
- ssrName: "apiKey";
401
+ ssrName: "licenseKey";
402
402
  docLink: string;
403
403
  type: string | null;
404
404
  getValue: ({ commandLine }: {
@@ -600,6 +600,21 @@ export declare const optionsMap: {
600
600
  };
601
601
  setConfig: (value: string | null) => void;
602
602
  };
603
+ readonly licenseKey: {
604
+ name: string;
605
+ cliFlag: "licenseKey-key";
606
+ description: () => import("react/jsx-runtime").JSX.Element;
607
+ ssrName: "licenseKey";
608
+ docLink: string;
609
+ type: string | null;
610
+ getValue: ({ commandLine }: {
611
+ commandLine: Record<string, unknown>;
612
+ }) => {
613
+ source: string;
614
+ value: string | null;
615
+ };
616
+ setConfig: (value: string | null) => void;
617
+ };
603
618
  };
604
619
  readonly getCompositions: {
605
620
  readonly mediaCacheSizeInBytes: {
@@ -1298,6 +1313,21 @@ export declare const optionsMap: {
1298
1313
  };
1299
1314
  setConfig: (value: string | null) => void;
1300
1315
  };
1316
+ readonly licenseKey: {
1317
+ name: string;
1318
+ cliFlag: "licenseKey-key";
1319
+ description: () => import("react/jsx-runtime").JSX.Element;
1320
+ ssrName: "licenseKey";
1321
+ docLink: string;
1322
+ type: string | null;
1323
+ getValue: ({ commandLine }: {
1324
+ commandLine: Record<string, unknown>;
1325
+ }) => {
1326
+ source: string;
1327
+ value: string | null;
1328
+ };
1329
+ setConfig: (value: string | null) => void;
1330
+ };
1301
1331
  };
1302
1332
  readonly renderStillOnLambda: {
1303
1333
  readonly mediaCacheSizeInBytes: {
@@ -1447,6 +1477,21 @@ export declare const optionsMap: {
1447
1477
  };
1448
1478
  setConfig: (value: string | null) => void;
1449
1479
  };
1480
+ readonly licenseKey: {
1481
+ name: string;
1482
+ cliFlag: "licenseKey-key";
1483
+ description: () => import("react/jsx-runtime").JSX.Element;
1484
+ ssrName: "licenseKey";
1485
+ docLink: string;
1486
+ type: string | null;
1487
+ getValue: ({ commandLine }: {
1488
+ commandLine: Record<string, unknown>;
1489
+ }) => {
1490
+ source: string;
1491
+ value: string | null;
1492
+ };
1493
+ setConfig: (value: string | null) => void;
1494
+ };
1450
1495
  };
1451
1496
  readonly getCompositionsOnLambda: {
1452
1497
  readonly mediaCacheSizeInBytes: {
@@ -17,6 +17,7 @@ const for_seamless_aac_concatenation_1 = require("./for-seamless-aac-concatenati
17
17
  const hardware_acceleration_1 = require("./hardware-acceleration");
18
18
  const image_sequence_pattern_1 = require("./image-sequence-pattern");
19
19
  const jpeg_quality_1 = require("./jpeg-quality");
20
+ const license_key_1 = require("./license-key");
20
21
  const log_level_1 = require("./log-level");
21
22
  const mute_1 = require("./mute");
22
23
  const number_of_gif_loops_1 = require("./number-of-gif-loops");
@@ -59,7 +60,7 @@ exports.optionsMap = {
59
60
  onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
60
61
  hardwareAcceleration: hardware_acceleration_1.hardwareAccelerationOption,
61
62
  chromeMode: chrome_mode_1.chromeModeOption,
62
- apiKey: api_key_1.apiKeyOption,
63
+ licenseKey: license_key_1.licenseKeyOption,
63
64
  },
64
65
  stitchFramesToVideo: {
65
66
  separateAudioTo: separate_audio_1.separateAudioOption,
@@ -76,6 +77,7 @@ exports.optionsMap = {
76
77
  onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
77
78
  chromeMode: chrome_mode_1.chromeModeOption,
78
79
  apiKey: api_key_1.apiKeyOption,
80
+ licenseKey: license_key_1.licenseKeyOption,
79
81
  },
80
82
  getCompositions: {
81
83
  mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
@@ -127,6 +129,7 @@ exports.optionsMap = {
127
129
  logLevel: log_level_1.logLevelOption,
128
130
  timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
129
131
  apiKey: api_key_1.apiKeyOption,
132
+ licenseKey: license_key_1.licenseKeyOption,
130
133
  },
131
134
  renderStillOnLambda: {
132
135
  mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
@@ -138,6 +141,7 @@ exports.optionsMap = {
138
141
  scale: scale_1.scaleOption,
139
142
  timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
140
143
  apiKey: api_key_1.apiKeyOption,
144
+ licenseKey: license_key_1.licenseKeyOption,
141
145
  },
142
146
  getCompositionsOnLambda: {
143
147
  mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
@@ -1,5 +1,6 @@
1
1
  import type { _InternalTypes } from 'remotion';
2
2
  import type { VideoConfig } from 'remotion/no-react';
3
+ import { NoReactInternals } from 'remotion/no-react';
3
4
  import { type RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
4
5
  import type { Bitrate } from './bitrate';
5
6
  import type { BrowserExecutable } from './browser-executable';
@@ -34,6 +35,16 @@ export type RenderMediaOnProgress = (progress: {
34
35
  stitchStage: StitchingState;
35
36
  }) => void;
36
37
  type MoreRenderMediaOptions = ToOptions<typeof optionsMap.renderMedia>;
38
+ type EitherApiKeyOrLicenseKey = true extends typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? {
39
+ licenseKey: string | null;
40
+ } : {
41
+ /**
42
+ * @deprecated Use `licenseKey` instead
43
+ */
44
+ apiKey?: string | null;
45
+ } | {
46
+ licenseKey?: string | null;
47
+ };
37
48
  export type InternalRenderMediaOptions = {
38
49
  outputLocation: string | null;
39
50
  composition: Omit<VideoConfig, 'props' | 'defaultProps'>;
@@ -70,9 +81,8 @@ export type InternalRenderMediaOptions = {
70
81
  compositionStart: number;
71
82
  onArtifact: OnArtifact | null;
72
83
  metadata: Record<string, string> | null;
73
- apiKey: string | null;
74
84
  onLog: OnLog;
75
- } & MoreRenderMediaOptions;
85
+ } & EitherApiKeyOrLicenseKey & MoreRenderMediaOptions;
76
86
  type Prettify<T> = {
77
87
  [K in keyof T]: T[K];
78
88
  } & {};
@@ -127,11 +137,11 @@ export type RenderMediaOptions = Prettify<{
127
137
  onArtifact?: OnArtifact;
128
138
  metadata?: Record<string, string> | null;
129
139
  compositionStart?: number;
130
- }> & Partial<MoreRenderMediaOptions>;
140
+ }> & EitherApiKeyOrLicenseKey & Partial<MoreRenderMediaOptions>;
131
141
  type RenderMediaResult = {
132
142
  buffer: Buffer | null;
133
143
  slowestFrames: SlowFrame[];
134
144
  };
135
145
  export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
136
- export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, apiKey, }: RenderMediaOptions) => Promise<RenderMediaResult>;
146
+ export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, ...apiKeyOrLicenseKey }: RenderMediaOptions) => Promise<RenderMediaResult>;
137
147
  export {};
@@ -54,7 +54,7 @@ const validate_videobitrate_1 = require("./validate-videobitrate");
54
54
  const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
55
55
  const SLOWEST_FRAME_COUNT = 10;
56
56
  const MAX_RECENT_FRAME_TIMINGS = 150;
57
- const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: compositionWithPossibleUnevenDimensions, serializedInputPropsWithCustomSchema, pixelFormat: userPixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, onLog, apiKey, }) => {
57
+ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: compositionWithPossibleUnevenDimensions, serializedInputPropsWithCustomSchema, pixelFormat: userPixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, onLog, licenseKey, }) => {
58
58
  var _a, _b;
59
59
  const pixelFormat = (_a = userPixelFormat !== null && userPixelFormat !== void 0 ? userPixelFormat : compositionWithPossibleUnevenDimensions.defaultPixelFormat) !== null && _a !== void 0 ? _a : pixel_format_1.DEFAULT_PIXEL_FORMAT;
60
60
  if (repro) {
@@ -469,15 +469,15 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: c
469
469
  slowestFrames,
470
470
  };
471
471
  const sendTelemetryAndResolve = () => {
472
- if (apiKey === null) {
472
+ if (licenseKey === null) {
473
473
  resolve(result);
474
474
  return;
475
475
  }
476
476
  (0, licensing_1.registerUsageEvent)({
477
- apiKey,
478
477
  event: 'cloud-render',
479
478
  host: null,
480
479
  succeeded: true,
480
+ licenseKey: licenseKey !== null && licenseKey !== void 0 ? licenseKey : null,
481
481
  })
482
482
  .then(() => {
483
483
  logger_1.Log.verbose({ indent, logLevel }, 'Usage event sent successfully');
@@ -562,13 +562,15 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
562
562
  * @description Render a video or an audio programmatically.
563
563
  * @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
564
564
  */
565
- const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, apiKey, }) => {
566
- var _a, _b;
565
+ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, ...apiKeyOrLicenseKey }) => {
566
+ var _a, _b, _c;
567
567
  const indent = false;
568
568
  const logLevel = verbose || dumpBrowserLogs ? 'verbose' : (passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : 'info');
569
569
  if (quality !== undefined) {
570
570
  logger_1.Log.warn({ indent, logLevel }, `The "quality" option has been renamed. Please use "jpegQuality" instead.`);
571
571
  }
572
+ const licenseKey = 'licenseKey' in apiKeyOrLicenseKey ? apiKeyOrLicenseKey.licenseKey : null;
573
+ const apiKey = 'apiKey' in apiKeyOrLicenseKey ? apiKeyOrLicenseKey.apiKey : null;
572
574
  return (0, exports.internalRenderMedia)({
573
575
  proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
574
576
  x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
@@ -639,7 +641,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
639
641
  hardwareAcceleration: hardwareAcceleration !== null && hardwareAcceleration !== void 0 ? hardwareAcceleration : 'disable',
640
642
  chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
641
643
  mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
642
- apiKey: apiKey !== null && apiKey !== void 0 ? apiKey : null,
644
+ licenseKey: (_c = licenseKey !== null && licenseKey !== void 0 ? licenseKey : apiKey) !== null && _c !== void 0 ? _c : null,
643
645
  onLog: default_on_log_1.defaultOnLog,
644
646
  });
645
647
  };
@@ -278,12 +278,13 @@ const internalRenderStillRaw = (options) => {
278
278
  });
279
279
  })
280
280
  .then((res) => {
281
+ var _a, _b;
281
282
  if (options.apiKey === null) {
282
283
  resolve(res);
283
284
  return;
284
285
  }
285
286
  (0, licensing_1.registerUsageEvent)({
286
- apiKey: options.apiKey,
287
+ licenseKey: (_b = (_a = options.licenseKey) !== null && _a !== void 0 ? _a : options.apiKey) !== null && _b !== void 0 ? _b : null,
287
288
  event: 'cloud-render',
288
289
  host: null,
289
290
  succeeded: true,
@@ -325,7 +326,7 @@ exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandli
325
326
  */
326
327
  const renderStill = (options) => {
327
328
  var _a, _b;
328
- 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, apiKey, } = options;
329
+ 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, apiKey, licenseKey, } = options;
329
330
  if (typeof jpegQuality !== 'undefined' && imageFormat !== 'jpeg') {
330
331
  throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
331
332
  }
@@ -377,6 +378,7 @@ const renderStill = (options) => {
377
378
  offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
378
379
  mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
379
380
  apiKey: apiKey !== null && apiKey !== void 0 ? apiKey : null,
381
+ licenseKey: licenseKey !== null && licenseKey !== void 0 ? licenseKey : null,
380
382
  onLog: default_on_log_1.defaultOnLog,
381
383
  });
382
384
  };
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.398",
6
+ "version": "4.0.400",
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
  "dependencies": {
23
23
  "execa": "5.1.1",
24
24
  "extract-zip": "2.0.1",
25
- "remotion": "4.0.398",
26
- "@remotion/streaming": "4.0.398",
25
+ "remotion": "4.0.400",
26
+ "@remotion/streaming": "4.0.400",
27
27
  "source-map": "^0.8.0-beta.0",
28
28
  "ws": "8.17.1",
29
- "@remotion/licensing": "4.0.398"
29
+ "@remotion/licensing": "4.0.400"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=16.8.0",
@@ -39,19 +39,19 @@
39
39
  "react": "19.2.3",
40
40
  "react-dom": "19.2.3",
41
41
  "@types/ws": "8.5.10",
42
- "@remotion/example-videos": "4.0.398",
43
- "@remotion/eslint-config-internal": "4.0.398",
42
+ "@remotion/example-videos": "4.0.400",
43
+ "@remotion/eslint-config-internal": "4.0.400",
44
44
  "eslint": "9.19.0",
45
45
  "@types/node": "20.12.14"
46
46
  },
47
47
  "optionalDependencies": {
48
- "@remotion/compositor-darwin-arm64": "4.0.398",
49
- "@remotion/compositor-darwin-x64": "4.0.398",
50
- "@remotion/compositor-linux-arm64-gnu": "4.0.398",
51
- "@remotion/compositor-linux-arm64-musl": "4.0.398",
52
- "@remotion/compositor-linux-x64-gnu": "4.0.398",
53
- "@remotion/compositor-linux-x64-musl": "4.0.398",
54
- "@remotion/compositor-win32-x64-msvc": "4.0.398"
48
+ "@remotion/compositor-darwin-arm64": "4.0.400",
49
+ "@remotion/compositor-darwin-x64": "4.0.400",
50
+ "@remotion/compositor-linux-arm64-gnu": "4.0.400",
51
+ "@remotion/compositor-linux-arm64-musl": "4.0.400",
52
+ "@remotion/compositor-linux-x64-gnu": "4.0.400",
53
+ "@remotion/compositor-linux-x64-musl": "4.0.400",
54
+ "@remotion/compositor-win32-x64-msvc": "4.0.400"
55
55
  },
56
56
  "keywords": [
57
57
  "remotion",