@remotion/renderer 4.0.171 → 4.0.172

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 CHANGED
@@ -10,10 +10,10 @@ export declare const BrowserSafeApis: {
10
10
  x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
11
11
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
12
12
  validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
13
- validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
13
+ validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
14
14
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
15
15
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
16
- DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
16
+ DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
17
17
  DEFAULT_TIMEOUT: number;
18
18
  DEFAULT_JPEG_QUALITY: number;
19
19
  DEFAULT_COLOR_SPACE: "default";
@@ -4,9 +4,6 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [
8
- string,
9
- string
10
- ] | null;
7
+ complexFilterFlag: [string, string] | null;
11
8
  cleanup: () => void;
12
9
  }>;
@@ -37,6 +37,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
37
37
  videoEnabled: false,
38
38
  indent,
39
39
  logLevel,
40
+ onServeUrlVisited: () => undefined,
40
41
  });
41
42
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
42
43
  page,
package/dist/index.d.ts CHANGED
@@ -143,7 +143,7 @@ export declare const RenderInternals: {
143
143
  DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
144
144
  validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
145
145
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
146
- DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
146
+ DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
147
147
  validateJpegQuality: (q: unknown) => void;
148
148
  DEFAULT_TIMEOUT: number;
149
149
  DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
@@ -583,6 +583,7 @@ export declare const RenderInternals: {
583
583
  server: import("./prepare-server").RemotionServer | undefined;
584
584
  serveUrl: string;
585
585
  id: string;
586
+ onServeUrlVisited: () => void;
586
587
  } & import("./options/option").ToOptions<{
587
588
  readonly offthreadVideoCacheSizeInBytes: {
588
589
  name: string;
@@ -784,7 +785,7 @@ export declare const RenderInternals: {
784
785
  assetsInfo: import("./assets/download-map").RenderAssetInfo | null;
785
786
  enforceAudioTrack: boolean;
786
787
  muted: boolean;
787
- }) => "no" | "yes" | "maybe";
788
+ }) => "yes" | "maybe" | "no";
788
789
  codecSupportsMedia: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => {
789
790
  video: boolean;
790
791
  audio: boolean;
@@ -2,5 +2,5 @@ import type { Codec } from './codec';
2
2
  export declare const validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
3
3
  export type PixelFormat = (typeof validPixelFormats)[number];
4
4
  export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
5
- export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
5
+ export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
6
6
  export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  /// <reference types="bun-types" />
4
3
  /// <reference types="node" />
5
4
  /// <reference types="node" />
6
5
  /// <reference types="node" />
7
6
  /// <reference types="bun-types" />
8
7
  /// <reference types="bun-types" />
8
+ /// <reference types="node" />
9
9
  import type { NetworkInterfaceInfo } from 'os';
10
10
  import os from 'os';
11
11
  type PortConfig = {
@@ -91,6 +91,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
91
91
  videoEnabled: imageFormat !== 'none',
92
92
  indent,
93
93
  logLevel,
94
+ onServeUrlVisited: () => undefined,
94
95
  });
95
96
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
96
97
  // eslint-disable-next-line max-params
@@ -149,6 +149,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
149
149
  videoEnabled: true,
150
150
  indent,
151
151
  logLevel,
152
+ onServeUrlVisited: () => undefined,
152
153
  });
153
154
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
154
155
  // eslint-disable-next-line max-params
@@ -19,6 +19,7 @@ type InternalSelectCompositionsConfig = {
19
19
  server: RemotionServer | undefined;
20
20
  serveUrl: string;
21
21
  id: string;
22
+ onServeUrlVisited: () => void;
22
23
  } & ToOptions<typeof optionsMap.selectComposition>;
23
24
  export type SelectCompositionOptions = RequiredInputPropsInV5 & {
24
25
  envVariables?: Record<string, string>;
@@ -14,7 +14,7 @@ const seek_to_frame_1 = require("./seek-to-frame");
14
14
  const set_props_and_env_1 = require("./set-props-and-env");
15
15
  const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
16
16
  const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
17
- const innerSelectComposition = async ({ page, onBrowserLog, serializedInputPropsWithCustomSchema, envVariables, serveUrl, timeoutInMilliseconds, port, id, indent, logLevel, }) => {
17
+ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputPropsWithCustomSchema, envVariables, serveUrl, timeoutInMilliseconds, port, id, indent, logLevel, onServeUrlVisited, }) => {
18
18
  if (onBrowserLog) {
19
19
  page.on('console', (log) => {
20
20
  onBrowserLog({
@@ -38,6 +38,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
38
38
  videoEnabled: false,
39
39
  indent,
40
40
  logLevel,
41
+ onServeUrlVisited,
41
42
  });
42
43
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
43
44
  page,
@@ -95,7 +96,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
95
96
  };
96
97
  const internalSelectCompositionRaw = async (options) => {
97
98
  const cleanup = [];
98
- const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, } = options;
99
+ const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onServeUrlVisited, } = options;
99
100
  const { page, cleanup: cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
100
101
  passedInInstance: puppeteerInstance,
101
102
  browserExecutable,
@@ -148,6 +149,7 @@ const internalSelectCompositionRaw = async (options) => {
148
149
  offthreadVideoCacheSizeInBytes,
149
150
  binariesDirectory,
150
151
  onBrowserDownload,
152
+ onServeUrlVisited,
151
153
  });
152
154
  })
153
155
  .then((data) => {
@@ -202,6 +204,7 @@ const selectComposition = async (options) => {
202
204
  logLevel,
203
205
  api: 'selectComposition()',
204
206
  }),
207
+ onServeUrlVisited: () => undefined,
205
208
  });
206
209
  return data.metadata;
207
210
  };
@@ -13,6 +13,7 @@ type SetPropsAndEnv = {
13
13
  videoEnabled: boolean;
14
14
  indent: boolean;
15
15
  logLevel: LogLevel;
16
+ onServeUrlVisited: () => void;
16
17
  };
17
18
  export declare const setPropsAndEnv: (params: SetPropsAndEnv) => Promise<unknown>;
18
19
  export {};
@@ -8,7 +8,7 @@ const normalize_serve_url_1 = require("./normalize-serve-url");
8
8
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
9
9
  const redirect_status_codes_1 = require("./redirect-status-codes");
10
10
  const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
11
- const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, indent, logLevel, }) => {
11
+ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, indent, logLevel, onServeUrlVisited, }) => {
12
12
  (0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
13
13
  const actualTimeout = timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT;
14
14
  page.setDefaultTimeout(actualTimeout);
@@ -92,6 +92,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
92
92
  videoEnabled,
93
93
  indent,
94
94
  logLevel,
95
+ onServeUrlVisited,
95
96
  });
96
97
  };
97
98
  // S3 in rare occasions returns a 500 or 503 error code for GET operations.
@@ -102,6 +103,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
102
103
  if (!redirect_status_codes_1.redirectStatusCodes.every((code) => code !== status)) {
103
104
  throw new Error(`Error while getting compositions: Tried to go to ${urlToVisit} but the status code was ${status} instead of 200. Does the site you specified exist?`);
104
105
  }
106
+ onServeUrlVisited();
105
107
  const { value: isRemotionFn } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
106
108
  pageFunction: () => {
107
109
  return window.getStaticCompositions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.171",
3
+ "version": "4.0.172",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.0.171"
21
+ "remotion": "4.0.172"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -41,16 +41,16 @@
41
41
  "react-dom": "18.3.1",
42
42
  "vitest": "0.31.1",
43
43
  "@types/ws": "8.5.10",
44
- "@remotion/streaming": "4.0.171"
44
+ "@remotion/streaming": "4.0.172"
45
45
  },
46
46
  "optionalDependencies": {
47
- "@remotion/compositor-linux-arm64-gnu": "4.0.171",
48
- "@remotion/compositor-darwin-arm64": "4.0.171",
49
- "@remotion/compositor-darwin-x64": "4.0.171",
50
- "@remotion/compositor-linux-arm64-musl": "4.0.171",
51
- "@remotion/compositor-win32-x64-msvc": "4.0.171",
52
- "@remotion/compositor-linux-x64-gnu": "4.0.171",
53
- "@remotion/compositor-linux-x64-musl": "4.0.171"
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.172",
48
+ "@remotion/compositor-darwin-arm64": "4.0.172",
49
+ "@remotion/compositor-linux-arm64-musl": "4.0.172",
50
+ "@remotion/compositor-darwin-x64": "4.0.172",
51
+ "@remotion/compositor-linux-x64-gnu": "4.0.172",
52
+ "@remotion/compositor-linux-x64-musl": "4.0.172",
53
+ "@remotion/compositor-win32-x64-msvc": "4.0.172"
54
54
  },
55
55
  "keywords": [
56
56
  "remotion",