Skip to content

🎥 Make videos programmatically with React

`@remotion/cli`: Fix printing of Chrome Headless Shell

Jonny Burgerdce19616498a
diff --git a/packages/cli/src/browser-download-bar.ts b/packages/cli/src/browser-download-bar.ts
index ad1c670293..005e92dfa6 100644
--- a/packages/cli/src/browser-download-bar.ts
+++ b/packages/cli/src/browser-download-bar.ts
@@ -96,7 +96,7 @@ export const defaultBrowserDownloadProgress = ({
bytesDownloaded: progress.downloadedBytes,
totalBytes: progress.totalSizeInBytes,
}),
- false,
+ progress.percent === 1,
);
},
};
diff --git a/packages/cloudrun/container/ensure-browser.mjs b/packages/cloudrun/container/ensure-browser.mjs
index 86a3b5fc80..ee554b9e6b 100644
--- a/packages/cloudrun/container/ensure-browser.mjs
+++ b/packages/cloudrun/container/ensure-browser.mjs
@@ -3104,7 +3104,6 @@ var downloadBrowser = async ({
indent,
logLevel
});
- Log.info({ indent, logLevel });
await import_extract_zip.default(archivePath, { dir: outputPath });
const chromePath = path3.join(outputPath, "chrome-linux", "chrome");
const chromeHeadlessShellPath = path3.join(outputPath, "chrome-linux", "chrome-headless-shell");
@@ -3160,7 +3159,6 @@ var defaultBrowserDownloadProgress = ({
logLevel,
api
}) => () => {
- Log.info({ indent, logLevel }, "No local browser could be found.");
Log.info({ indent, logLevel }, "Downloading Chrome Headless Shell https://www.remotion.dev/docs/miscellaneous/chrome-headless-shell");
Log.info({ indent, logLevel }, `Customize this behavior by adding a onBrowserDownload function to ${api}.`);
return {
@@ -3177,698 +3175,8 @@ var defaultBrowserDownloadProgress = ({
// src/get-local-browser.ts
import fs4 from "fs";
-import {homedir} from "node:os";
-
-// /Users/jonathanburger/remotion/packages/renderer/node_modules/remotion/dist/esm/no-react.mjs
-var interpolate = function(input, inputRange, outputRange, options) {
- if (typeof input === "undefined") {
- throw new Error("input can not be undefined");
- }
- if (typeof inputRange === "undefined") {
- throw new Error("inputRange can not be undefined");
- }
- if (typeof outputRange === "undefined") {
- throw new Error("outputRange can not be undefined");
- }
- if (inputRange.length !== outputRange.length) {
- throw new Error("inputRange (" + inputRange.length + ") and outputRange (" + outputRange.length + ") must have the same length");
- }
- checkInfiniteRange("inputRange", inputRange);
- checkInfiniteRange("outputRange", outputRange);
- checkValidInputRange(inputRange);
- const easing = options?.easing ?? ((num) => num);
- let extrapolateLeft = "extend";
- if (options?.extrapolateLeft !== undefined) {
- extrapolateLeft = options.extrapolateLeft;
- }
- let extrapolateRight = "extend";
- if (options?.extrapolateRight !== undefined) {
- extrapolateRight = options.extrapolateRight;
- }
- if (typeof input !== "number") {
- throw new TypeError("Cannot interpolate an input which is not a number");
- }
- const range = findRange(input, inputRange);
- return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
- easing,
- extrapolateLeft,
- extrapolateRight
- });
-};
-var truthy4 = function(value) {
- return Boolean(value);
-};
-var processColor = function(color) {
- const normalizedColor = normalizeColor(color);
- return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;
-};
-var validateDimension = function(amount, nameOfProp, location) {
- if (typeof amount !== "number") {
- throw new Error(`The "${nameOfProp}" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);
- }
- if (isNaN(amount)) {
- throw new TypeError(`The "${nameOfProp}" prop ${location} must not be NaN, but is NaN.`);
- }
- if (!Number.isFinite(amount)) {
- throw new TypeError(`The "${nameOfProp}" prop ${location} must be finite, but is ${amount}.`);
- }
- if (amount % 1 !== 0) {
- throw new TypeError(`The "${nameOfProp}" prop ${location} must be an integer, but is ${amount}.`);
- }
- if (amount <= 0) {
- throw new TypeError(`The "${nameOfProp}" prop ${location} must be positive, but got ${amount}.`);
- }
-};
-var validateDurationInFrames = function(durationInFrames, options) {
- const { allowFloats, component } = options;
- if (typeof durationInFrames === "undefined") {
- throw new Error(`The "durationInFrames" prop ${component} is missing.`);
- }
- if (typeof durationInFrames !== "number") {
- throw new Error(`The "durationInFrames" prop ${component} must be a number, but you passed a value of type ${typeof durationInFrames}`);
- }
- if (durationInFrames <= 0) {
- throw new TypeError(`The "durationInFrames" prop ${component} must be positive, but got ${durationInFrames}.`);
- }
- if (!allowFloats && durationInFrames % 1 !== 0) {
- throw new TypeError(`The "durationInFrames" prop ${component} must be an integer, but got ${durationInFrames}.`);
- }
- if (!Number.isFinite(durationInFrames)) {
- throw new TypeError(`The "durationInFrames" prop ${component} must be finite, but got ${durationInFrames}.`);
- }
-};
-var validateFps = function(fps, location, isGif) {
- if (typeof fps !== "number") {
- throw new Error(`"fps" must be a number, but you passed a value of type ${typeof fps} ${location}`);
- }
- if (!Number.isFinite(fps)) {
- throw new Error(`"fps" must be a finite, but you passed ${fps} ${location}`);
- }
- if (isNaN(fps)) {
- throw new Error(`"fps" must not be NaN, but got ${fps} ${location}`);
- }
- if (fps <= 0) {
- throw new TypeError(`"fps" must be positive, but got ${fps} ${location}`);
- }
- if (isGif && fps > 50) {
- throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
- }
-};
-var interpolateFunction = function(input, inputRange, outputRange, options) {
- const { extrapolateLeft, extrapolateRight, easing } = options;
- let result = input;
- const [inputMin, inputMax] = inputRange;
- const [outputMin, outputMax] = outputRange;
- if (result < inputMin) {
- if (extrapolateLeft === "identity") {
- return result;
- }
- if (extrapolateLeft === "clamp") {
- result = inputMin;
- } else if (extrapolateLeft === "wrap") {
- const range = inputMax - inputMin;
- result = ((result - inputMin) % range + range) % range + inputMin;
- } else if (extrapolateLeft === "extend") {
- }
- }
- if (result > inputMax) {
- if (extrapolateRight === "identity") {
- return result;
- }
- if (extrapolateRight === "clamp") {
- result = inputMax;
- } else if (extrapolateRight === "wrap") {
- const range = inputMax - inputMin;
- result = ((result - inputMin) % range + range) % range + inputMin;
- } else if (extrapolateRight === "extend") {
- }
- }
- if (outputMin === outputMax) {
- return outputMin;
- }
- result = (result - inputMin) / (inputMax - inputMin);
- result = easing(result);
- result = result * (outputMax - outputMin) + outputMin;
- return result;
-};
-var findRange = function(input, inputRange) {
- let i;
- for (i = 1;i < inputRange.length - 1; ++i) {
- if (inputRange[i] >= input) {
- break;
- }
- }
- return i - 1;
-};
-var checkValidInputRange = function(arr) {
- for (let i = 1;i < arr.length; ++i) {
- if (!(arr[i] > arr[i - 1])) {
- throw new Error(`inputRange must be strictly monotonically increasing but got [${arr.join(",")}]`);
- }
- }
-};
-var checkInfiniteRange = function(name, arr) {
- if (arr.length < 2) {
- throw new Error(name + " must have at least 2 elements");
- }
- for (const element of arr) {
- if (typeof element !== "number") {
- throw new Error(`${name} must contain only numbers`);
- }
- if (!Number.isFinite(element)) {
- throw new Error(`${name} must contain only finite numbers, but got [${arr.join(",")}]`);
- }
- }
-};
-if (typeof window !== "undefined") {
- window.remotion_renderReady = false;
-}
-if (typeof window !== "undefined") {
- window.remotion_delayRenderTimeouts = {};
-}
-var DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:";
-var DELAY_RENDER_RETRIES_LEFT = "Retries left: ";
-var DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.";
-var problematicCharacters = {
- "%3A": ":",
- "%2F": "/",
- "%3F": "?",
- "%23": "#",
- "%5B": "[",
- "%5D": "]",
- "%40": "@",
- "%21": "!",
- "%24": "$",
- "%26": "&",
- "%27": "'",
- "%28": "(",
- "%29": ")",
- "%2A": "*",
- "%2B": "+",
- "%2C": ",",
- "%3B": ";"
-};
-var didWarn = {};
-var warnOnce = (message) => {
- if (didWarn[message]) {
- return;
- }
- console.warn(message);
- didWarn[message] = true;
-};
-var includesHexOfUnsafeChar = (path4) => {
- for (const key of Object.keys(problematicCharacters)) {
- if (path4.includes(key)) {
- return { containsHex: true, hexCode: key };
- }
- }
- return { containsHex: false };
-};
-var trimLeadingSlash = (path4) => {
- if (path4.startsWith("/")) {
- return trimLeadingSlash(path4.substring(1));
- }
- return path4;
-};
-var inner = (path4) => {
- if (typeof window !== "undefined" && window.remotion_staticBase) {
- if (path4.startsWith(window.remotion_staticBase)) {
- throw new Error(`The value "${path4}" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);
- }
- return `${window.remotion_staticBase}/${trimLeadingSlash(path4)}`;
- }
- return `/${trimLeadingSlash(path4)}`;
-};
-var encodeBySplitting = (path4) => {
- const splitBySlash = path4.split("/");
- const encodedArray = splitBySlash.map((element) => {
- return encodeURIComponent(element);
- });
- const merged = encodedArray.join("/");
- return merged;
-};
-var staticFile = (path4) => {
- if (path4.startsWith("http://") || path4.startsWith("https://")) {
- throw new TypeError(`staticFile() does not support remote URLs - got "${path4}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);
- }
- if (path4.startsWith("..") || path4.startsWith("./")) {
- throw new TypeError(`staticFile() does not support relative paths - got "${path4}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);
- }
- if (path4.startsWith("/Users") || path4.startsWith("/home") || path4.startsWith("/tmp") || path4.startsWith("/etc") || path4.startsWith("/opt") || path4.startsWith("/var") || path4.startsWith("C:") || path4.startsWith("D:") || path4.startsWith("E:")) {
- throw new TypeError(`staticFile() does not support absolute paths - got "${path4}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);
- }
- if (path4.startsWith("public/")) {
- throw new TypeError(`Do not include the public/ prefix when using staticFile() - got "${path4}". See: https://remotion.dev/docs/staticfile-relative-paths`);
- }
- const includesHex = includesHexOfUnsafeChar(path4);
- if (includesHex.containsHex) {
- warnOnce(`WARNING: You seem to pass an already encoded path (path contains ${includesHex.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);
- }
- const preprocessed = encodeBySplitting(path4);
- const preparsed = inner(preprocessed);
- if (!preparsed.startsWith("/")) {
- return `/${preparsed}`;
- }
- return preparsed;
-};
-var DATE_TOKEN = "remotion-date:";
-var FILE_TOKEN = "remotion-file:";
-var serializeJSONWithDate = ({
- data,
- indent,
- staticBase
-}) => {
- let customDateUsed = false;
- let customFileUsed = false;
- let mapUsed = false;
- let setUsed = false;
- try {
- const serializedString = JSON.stringify(data, function(key, value) {
- const item = this[key];
- if (item instanceof Date) {
- customDateUsed = true;
- return `${DATE_TOKEN}${item.toISOString()}`;
- }
- if (item instanceof Map) {
- mapUsed = true;
- return value;
- }
- if (item instanceof Set) {
- setUsed = true;
- return value;
- }
- if (typeof item === "string" && staticBase !== null && item.startsWith(staticBase)) {
- customFileUsed = true;
- return `${FILE_TOKEN}${item.replace(staticBase + "/", "")}`;
- }
- return value;
- }, indent);
- return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };
- } catch (err) {
- throw new Error("Could not serialize the passed input props to JSON: " + err.message);
- }
-};
-var deserializeJSONWithCustomFields = (data) => {
- return JSON.parse(data, (_, value) => {
- if (typeof value === "string" && value.startsWith(DATE_TOKEN)) {
- return new Date(value.replace(DATE_TOKEN, ""));
- }
- if (typeof value === "string" && value.startsWith(FILE_TOKEN)) {
- return staticFile(value.replace(FILE_TOKEN, ""));
- }
- return value;
- });
-};
-var call = function(...args) {
- return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
-};
-var getMatchers = function() {
- const cachedMatchers = {
- rgb: undefined,
- rgba: undefined,
- hsl: undefined,
- hsla: undefined,
- hex3: undefined,
- hex4: undefined,
- hex5: undefined,
- hex6: undefined,
- hex8: undefined
- };
- if (cachedMatchers.rgb === undefined) {
- cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
- cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
- cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
- cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
- cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
- cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
- cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
- cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
- }
- return cachedMatchers;
-};
-var hue2rgb = function(p, q, t) {
- if (t < 0) {
- t += 1;
- }
- if (t > 1) {
- t -= 1;
- }
- if (t < 1 / 6) {
- return p + (q - p) * 6 * t;
- }
- if (t < 1 / 2) {
- return q;
- }
- if (t < 2 / 3) {
- return p + (q - p) * (2 / 3 - t) * 6;
- }
- return p;
-};
-var hslToRgb = function(h, s, l) {
- const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
- const p = 2 * l - q;
- const r = hue2rgb(p, q, h + 1 / 3);
- const g = hue2rgb(p, q, h);
- const b = hue2rgb(p, q, h - 1 / 3);
- return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
-};
-var parse255 = function(str) {
- const int = Number.parseInt(str, 10);
- if (int < 0) {
- return 0;
- }
- if (int > 255) {
- return 255;
- }
- return int;
-};
-var parse360 = function(str) {
- const int = Number.parseFloat(str);
- return (int % 360 + 360) % 360 / 360;
-};
-var parse1 = function(str) {
- const num = Number.parseFloat(str);
- if (num < 0) {
- return 0;
- }
- if (num > 1) {
- return 255;
- }
- return Math.round(num * 255);
-};
-var parsePercentage = function(str) {
- const int = Number.parseFloat(str);
- if (int < 0) {
- return 0;
- }
- if (int > 100) {
- return 1;
- }
- return int / 100;
-};
-var normalizeColor = function(color) {
- const matchers = getMatchers();
- let match;
- if (matchers.hex6) {
- if (match = matchers.hex6.exec(color)) {
- return Number.parseInt(match[1] + "ff", 16) >>> 0;
- }
- }
- if (colorNames[color] !== undefined) {
- return colorNames[color];
- }
- if (matchers.rgb) {
- if (match = matchers.rgb.exec(color)) {
- return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;
- }
- }
- if (matchers.rgba) {
- if (match = matchers.rgba.exec(color)) {
- return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
- }
- }
- if (matchers.hex3) {
- if (match = matchers.hex3.exec(color)) {
- return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
- }
- }
- if (matchers.hex8) {
- if (match = matchers.hex8.exec(color)) {
- return Number.parseInt(match[1], 16) >>> 0;
- }
- }
- if (matchers.hex4) {
- if (match = matchers.hex4.exec(color)) {
- return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
- }
- }
- if (matchers.hsl) {
- if (match = matchers.hsl.exec(color)) {
- return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;
- }
- }
- if (matchers.hsla) {
- if (match = matchers.hsla.exec(color)) {
- return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
- }
- }
- throw new Error(`invalid color string ${color} provided`);
-};
-var NUMBER = "[-+]?\\d*\\.?\\d+";
-var PERCENTAGE = NUMBER + "%";
-var colorNames = {
- transparent: 0,
- aliceblue: 4042850303,
- antiquewhite: 4209760255,
- aqua: 16777215,
- aquamarine: 2147472639,
- azure: 4043309055,
- beige: 4126530815,
- bisque: 4293182719,
- black: 255,
- blanchedalmond: 4293643775,
- blue: 65535,
- blueviolet: 2318131967,
- brown: 2771004159,
- burlywood: 3736635391,
- burntsienna: 3934150143,
- cadetblue: 1604231423,
- chartreuse: 2147418367,
- chocolate: 3530104575,
- coral: 4286533887,
- cornflowerblue: 1687547391,
- cornsilk: 4294499583,
- crimson: 3692313855,
- cyan: 16777215,
- darkblue: 35839,
- darkcyan: 9145343,
- darkgoldenrod: 3095792639,
- darkgray: 2846468607,
- darkgreen: 6553855,
- darkgrey: 2846468607,
- darkkhaki: 3182914559,
- darkmagenta: 2332068863,
- darkolivegreen: 1433087999,
- darkorange: 4287365375,
- darkorchid: 2570243327,
- darkred: 2332033279,
- darksalmon: 3918953215,
- darkseagreen: 2411499519,
- darkslateblue: 1211993087,
- darkslategray: 793726975,
- darkslategrey: 793726975,
- darkturquoise: 13554175,
- darkviolet: 2483082239,
- deeppink: 4279538687,
- deepskyblue: 12582911,
- dimgray: 1768516095,
- dimgrey: 1768516095,
- dodgerblue: 512819199,
- firebrick: 2988581631,
- floralwhite: 4294635775,
- forestgreen: 579543807,
- fuchsia: 4278255615,
- gainsboro: 3705462015,
- ghostwhite: 4177068031,
- gold: 4292280575,
- goldenrod: 3668254975,
- gray: 2155905279,
- green: 8388863,
- greenyellow: 2919182335,
- grey: 2155905279,
- honeydew: 4043305215,
- hotpink: 4285117695,
- indianred: 3445382399,
- indigo: 1258324735,
- ivory: 4294963455,
- khaki: 4041641215,
- lavender: 3873897215,
- lavenderblush: 4293981695,
- lawngreen: 2096890111,
- lemonchiffon: 4294626815,
- lightblue: 2916673279,
- lightcoral: 4034953471,
- lightcyan: 3774873599,
- lightgoldenrodyellow: 4210742015,
- lightgray: 3553874943,
- lightgreen: 2431553791,
- lightgrey: 3553874943,
- lightpink: 4290167295,
- lightsalmon: 4288707327,
- lightseagreen: 548580095,
- lightskyblue: 2278488831,
- lightslategray: 2005441023,
- lightslategrey: 2005441023,
- lightsteelblue: 2965692159,
- lightyellow: 4294959359,
- lime: 16711935,
- limegreen: 852308735,
- linen: 4210091775,
- magenta: 4278255615,
- maroon: 2147483903,
- mediumaquamarine: 1724754687,
- mediumblue: 52735,
- mediumorchid: 3126187007,
- mediumpurple: 2473647103,
- mediumseagreen: 1018393087,
- mediumslateblue: 2070474495,
- mediumspringgreen: 16423679,
- mediumturquoise: 1221709055,
- mediumvioletred: 3340076543,
- midnightblue: 421097727,
- mintcream: 4127193855,
- mistyrose: 4293190143,
- moccasin: 4293178879,
- navajowhite: 4292783615,
- navy: 33023,
- oldlace: 4260751103,
- olive: 2155872511,
- olivedrab: 1804477439,
- orange: 4289003775,
- orangered: 4282712319,
- orchid: 3664828159,
- palegoldenrod: 4008225535,
- palegreen: 2566625535,
- paleturquoise: 2951671551,
- palevioletred: 3681588223,
- papayawhip: 4293907967,
- peachpuff: 4292524543,
- peru: 3448061951,
- pink: 4290825215,
- plum: 3718307327,
- powderblue: 2967529215,
- purple: 2147516671,
- rebeccapurple: 1714657791,
- red: 4278190335,
- rosybrown: 3163525119,
- royalblue: 1097458175,
- saddlebrown: 2336560127,
- salmon: 4202722047,
- sandybrown: 4104413439,
- seagreen: 780883967,
- seashell: 4294307583,
- sienna: 2689740287,
- silver: 3233857791,
- skyblue: 2278484991,
- slateblue: 1784335871,
- slategray: 1887473919,
- slategrey: 1887473919,
- snow: 4294638335,
- springgreen: 16744447,
- steelblue: 1182971135,
- tan: 3535047935,
- teal: 8421631,
- thistle: 3636451583,
- tomato: 4284696575,
- turquoise: 1088475391,
- violet: 4001558271,
- wheat: 4125012991,
- white: 4294967295,
- whitesmoke: 4126537215,
- yellow: 4294902015,
- yellowgreen: 2597139199
-};
-var ENABLE_V5_BREAKING_CHANGES = false;
-var validateFrame = ({
- allowFloats,
- durationInFrames,
- frame
-}) => {
- if (typeof frame === "undefined") {
- throw new TypeError(`Argument missing for parameter "frame"`);
- }
- if (typeof frame !== "number") {
- throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
- }
- if (!Number.isFinite(frame)) {
- throw new RangeError(`Frame ${frame} is not finite`);
- }
- if (frame % 1 !== 0 && !allowFloats) {
- throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
- }
- if (frame < 0 && frame < -durationInFrames) {
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
- }
- if (frame > durationInFrames - 1) {
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
- }
-};
-var validateDefaultAndInputProps = (defaultProps, name, compositionId) => {
- if (!defaultProps) {
- return;
- }
- if (typeof defaultProps !== "object") {
- throw new Error(`"${name}" must be an object, but you passed a value of type ${typeof defaultProps}`);
- }
- if (Array.isArray(defaultProps)) {
- throw new Error(`"${name}" must be an object, an array was passed ${compositionId ? `for composition "${compositionId}"` : ""}`);
- }
-};
-var getExpectedMediaFrameUncorrected = ({
- frame,
- playbackRate,
- startFrom
-}) => {
- return interpolate(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);
-};
-var getAbsoluteSrc = (relativeSrc) => {
- if (typeof window === "undefined") {
- return relativeSrc;
- }
- return new URL(relativeSrc, window.origin).href;
-};
-var getOffthreadVideoSource = ({
- src,
- transparent,
- currentTime,
- toneMapped
-}) => {
- return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc(src))}&time=${encodeURIComponent(currentTime)}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;
-};
-var NoReactInternals = {
- processColor,
- truthy: truthy4,
- validateFps,
- validateDimension,
- validateDurationInFrames,
- validateDefaultAndInputProps,
- validateFrame,
- serializeJSONWithDate,
- bundleName: "bundle.js",
- bundleMapName: "bundle.js.map",
- deserializeJSONWithCustomFields,
- DELAY_RENDER_CALLSTACK_TOKEN,
- DELAY_RENDER_RETRY_TOKEN,
- DELAY_RENDER_ATTEMPT_TOKEN: DELAY_RENDER_RETRIES_LEFT,
- getOffthreadVideoSource,
- getExpectedMediaFrameUncorrected,
- ENABLE_V5_BREAKING_CHANGES,
- MIN_NODE_VERSION: ENABLE_V5_BREAKING_CHANGES ? 18 : 16,
- MIN_BUN_VERSION: ENABLE_V5_BREAKING_CHANGES ? "1.1.3" : "1.0.3",
- colorNames,
- DATE_TOKEN,
- FILE_TOKEN
-};
-
-// src/get-local-browser.ts
var getSearchPathsForProduct = () => {
- if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES) {
- return [];
- }
- return [
- process.env.PUPPETEER_EXECUTABLE_PATH ?? null,
- process.platform === "darwin" ? "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" : null,
- process.platform === "linux" ? "/usr/bin/google-chrome" : null,
- process.platform === "linux" ? "/usr/bin/chromium-browser" : null,
- process.platform === "linux" ? "/usr/bin/chromium" : null,
- process.platform === "linux" ? "/app/.apt/usr/bin/google-chrome-stable" : null,
- process.platform === "win32" ? "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" : null,
- process.platform === "win32" ? "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" : null,
- process.platform === "win32" ? homedir() + "\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe" : null,
- process.platform === "win32" ? "C:\\Program Files\\Google\\Chrome SxS\\Application\\chrome.exe" : null,
- process.platform === "win32" ? "C:\\Program Files (x86)\\Google\\Chrome SxS\\Application\\chrome.exe" : null,
- process.platform === "win32" ? homedir() + "\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe" : null
- ].filter(Boolean);
+ return [];
};
var getLocalBrowser = () => {
for (const p of getSearchPathsForProduct()) {
diff --git a/packages/renderer/src/browser/BrowserFetcher.ts b/packages/renderer/src/browser/BrowserFetcher.ts
index a44459bd21..f4e9e22581 100644
--- a/packages/renderer/src/browser/BrowserFetcher.ts
+++ b/packages/renderer/src/browser/BrowserFetcher.ts
@@ -25,7 +25,6 @@ import {promisify} from 'node:util';
import {downloadFile} from '../assets/download-file';
import {makeFileExecutableIfItIsNot} from '../compositor/make-file-executable';
import type {LogLevel} from '../log-level';
-import {Log} from '../logger';
import type {DownloadBrowserProgressFn} from '../options/on-browser-download';
import {getDownloadsCacheDir} from './get-download-destination';
@@ -151,7 +150,6 @@ export const downloadBrowser = async ({
indent,
logLevel,
});
- Log.info({indent, logLevel});
await extractZip(archivePath, {dir: outputPath});
const chromePath = path.join(outputPath, 'chrome-linux', 'chrome');
const chromeHeadlessShellPath = path.join(