@remotion/renderer 3.2.4 → 3.2.9

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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import execa from 'execa';
2
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
3
4
  import { mimeContentType, mimeLookup } from './mime-types';
@@ -67,7 +68,7 @@ export declare const RenderInternals: {
67
68
  task: Promise<Buffer | null>;
68
69
  getLogs: () => string;
69
70
  }>;
70
- getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
71
+ getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
71
72
  tmpDir: (str: string) => string;
72
73
  deleteDirectory: (directory: string) => Promise<void>;
73
74
  isServeUrl: (potentialUrl: string) => boolean;
@@ -122,8 +123,8 @@ export declare const RenderInternals: {
122
123
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
123
124
  DEFAULT_BROWSER: import("./browser").Browser;
124
125
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
125
- DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
126
- validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
126
+ DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
127
+ validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
127
128
  getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
128
129
  validateSelectedCrfAndCodecCombination: (crf: unknown, codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => void;
129
130
  validImageFormats: readonly ["png", "jpeg", "none"];
@@ -135,12 +136,12 @@ export declare const RenderInternals: {
135
136
  DEFAULT_TIMEOUT: number;
136
137
  getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
137
138
  validateSelectedPixelFormatAndCodecCombination: (pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le", codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => void;
138
- validateSelectedCodecAndProResCombination: (actualCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", actualProResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined) => void;
139
- validateSelectedPixelFormatAndImageFormatCombination: (pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le", imageFormat: "png" | "jpeg" | "none") => "none" | "valid";
139
+ validateSelectedCodecAndProResCombination: (actualCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", actualProResProfile: "proxy" | "4444-xq" | "4444" | "hq" | "standard" | "light" | undefined) => void;
140
+ validateSelectedPixelFormatAndImageFormatCombination: (pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le", imageFormat: "jpeg" | "png" | "none") => "none" | "valid";
140
141
  DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
141
142
  isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
142
143
  logLevels: readonly ["verbose", "info", "warn", "error"];
143
- isEqualOrBelowLogLevel: (currentLevel: "verbose" | "error" | "info" | "warn", level: "verbose" | "error" | "info" | "warn") => boolean;
144
+ isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
144
145
  isValidLogLevel: (level: string) => boolean;
145
146
  validateEveryNthFrame: (everyNthFrame: unknown) => void;
146
147
  perf: typeof perf;
@@ -91,13 +91,26 @@ const innerRenderFrames = ({ onFrameUpdate, outputDir, onStart, inputProps, qual
91
91
  videoEnabled: imageFormat !== 'none',
92
92
  });
93
93
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
94
- pageFunction: (id) => {
94
+ // eslint-disable-next-line max-params
95
+ pageFunction: (id, defaultProps, durationInFrames, fps, height, width) => {
95
96
  window.setBundleMode({
96
97
  type: 'composition',
97
98
  compositionName: id,
99
+ compositionDefaultProps: defaultProps,
100
+ compositionDurationInFrames: durationInFrames,
101
+ compositionFps: fps,
102
+ compositionHeight: height,
103
+ compositionWidth: width,
98
104
  });
99
105
  },
100
- args: [composition.id],
106
+ args: [
107
+ composition.id,
108
+ composition.defaultProps,
109
+ composition.durationInFrames,
110
+ composition.fps,
111
+ composition.height,
112
+ composition.width,
113
+ ],
101
114
  frame: null,
102
115
  page,
103
116
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { SmallTCompMetadata } from 'remotion';
2
3
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
3
4
  import type { DownloadMap } from './assets/download-map';
@@ -121,13 +121,26 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
121
121
  videoEnabled: true,
122
122
  });
123
123
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
124
- pageFunction: (id) => {
124
+ // eslint-disable-next-line max-params
125
+ pageFunction: (id, defaultProps, durationInFrames, fps, height, width) => {
125
126
  window.setBundleMode({
126
127
  type: 'composition',
127
128
  compositionName: id,
129
+ compositionDefaultProps: defaultProps,
130
+ compositionDurationInFrames: durationInFrames,
131
+ compositionFps: fps,
132
+ compositionHeight: height,
133
+ compositionWidth: width,
128
134
  });
129
135
  },
130
- args: [composition.id],
136
+ args: [
137
+ composition.id,
138
+ composition.defaultProps,
139
+ composition.durationInFrames,
140
+ composition.fps,
141
+ composition.height,
142
+ composition.width,
143
+ ],
131
144
  frame: null,
132
145
  page,
133
146
  });
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setPropsAndEnv = void 0;
4
+ const version_1 = require("remotion/version");
4
5
  const TimeoutSettings_1 = require("./browser/TimeoutSettings");
5
6
  const normalize_serve_url_1 = require("./normalize-serve-url");
6
7
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
@@ -90,9 +91,25 @@ const setPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initia
90
91
  frame: null,
91
92
  page,
92
93
  });
94
+ const remotionVersion = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
95
+ pageFunction: () => {
96
+ return window.remotion_version;
97
+ },
98
+ args: [],
99
+ frame: null,
100
+ page,
101
+ });
93
102
  const requiredVersion = '4';
94
103
  if (siteVersion !== requiredVersion) {
95
104
  throw new Error(`Incompatible site: When visiting ${urlToVisit}, a bundle was found, but one that is not compatible with this version of Remotion. Found version: ${siteVersion} - Required version: ${requiredVersion}. To resolve this error, please bundle and deploy again.`);
96
105
  }
106
+ if (remotionVersion !== version_1.VERSION) {
107
+ if (remotionVersion) {
108
+ console.warn(`The site was bundled with version ${remotionVersion} of @remotion/bundler, while @remotion/renderer is on version ${version_1.VERSION}. You may not have the newest bugfixes and features. Re-bundle the site to fix this issue.`);
109
+ }
110
+ else {
111
+ console.warn(`The site was bundled with an old version of Remotion, while @remotion/renderer is on version ${version_1.VERSION}. You may not have the newest bugfixes and features. Re-bundle the site to fix this issue.`);
112
+ }
113
+ }
97
114
  };
98
115
  exports.setPropsAndEnv = setPropsAndEnv;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "3.2.4",
3
+ "version": "3.2.9",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "execa": "5.1.1",
24
24
  "extract-zip": "2.0.1",
25
- "remotion": "3.2.4",
25
+ "remotion": "3.2.9",
26
26
  "source-map": "^0.8.0-beta.0",
27
27
  "ws": "8.7.0"
28
28
  },
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "ee420b99227e0e5bcf093c108e3695f5d46e3658"
60
+ "gitHead": "66eceb7252865747a2808fc51cdbd2b57bb38486"
61
61
  }