@remotion/renderer 4.0.341 → 4.0.345

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.
@@ -0,0 +1,7 @@
1
+ import type { InlineAudioAsset } from 'remotion/no-react';
2
+ export declare const makeInlineAudioMixing: (dir: string) => {
3
+ cleanup: () => void;
4
+ addAsset: (asset: InlineAudioAsset, fps: number, totalNumberOfFrames: number) => void;
5
+ folder: string;
6
+ };
7
+ export type InlineAudioMixing = ReturnType<typeof makeInlineAudioMixing>;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.makeInlineAudioMixing = void 0;
40
+ const node_fs_1 = __importStar(require("node:fs"));
41
+ const node_path_1 = __importDefault(require("node:path"));
42
+ const delete_directory_1 = require("../delete-directory");
43
+ const sample_rate_1 = require("../sample-rate");
44
+ const download_map_1 = require("./download-map");
45
+ const numberTo32BiIntLittleEndian = (num) => {
46
+ return new Uint8Array([
47
+ num & 0xff,
48
+ (num >> 8) & 0xff,
49
+ (num >> 16) & 0xff,
50
+ (num >> 24) & 0xff,
51
+ ]);
52
+ };
53
+ const numberTo16BitLittleEndian = (num) => {
54
+ return new Uint8Array([num & 0xff, (num >> 8) & 0xff]);
55
+ };
56
+ const BIT_DEPTH = 16;
57
+ const BYTES_PER_SAMPLE = BIT_DEPTH / 8;
58
+ const makeInlineAudioMixing = (dir) => {
59
+ const folderToAdd = (0, download_map_1.makeAndReturn)(dir, 'remotion-inline-audio-mixing');
60
+ // asset id -> file descriptor
61
+ const openFiles = {};
62
+ const cleanup = () => {
63
+ for (const fd of Object.values(openFiles)) {
64
+ node_fs_1.default.closeSync(fd);
65
+ }
66
+ (0, delete_directory_1.deleteDirectory)(folderToAdd);
67
+ };
68
+ const ensureAsset = (asset, fps, totalNumberOfFrames) => {
69
+ const filePath = node_path_1.default.join(folderToAdd, `${asset.id}.wav`);
70
+ if (!openFiles[asset.id]) {
71
+ openFiles[asset.id] = node_fs_1.default.openSync(filePath, 'w');
72
+ }
73
+ const expectedDataSize = Math.round((totalNumberOfFrames / fps) *
74
+ asset.numberOfChannels *
75
+ sample_rate_1.DEFAULT_SAMPLE_RATE *
76
+ BYTES_PER_SAMPLE);
77
+ console.log({ totalNumberOfFrames, fps });
78
+ const expectedSize = 40 + expectedDataSize;
79
+ const { numberOfChannels } = asset;
80
+ const fd = openFiles[asset.id];
81
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([0x52, 0x49, 0x46, 0x46]), 0, 4, 0); // "RIFF"
82
+ (0, node_fs_1.writeSync)(fd, new Uint8Array(numberTo32BiIntLittleEndian(expectedSize)), 0, 4, 4); // Remaining size
83
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([0x57, 0x41, 0x56, 0x45]), 0, 4, 8); // "WAVE"
84
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([0x66, 0x6d, 0x74, 0x20]), 0, 4, 12); // "fmt "
85
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([BIT_DEPTH, 0x00, 0x00, 0x00]), 0, 4, 16); // fmt chunk size = 16
86
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([0x01, 0x00]), 0, 2, 20); // Audio format (PCM) = 1, set 3 if float32 would be true
87
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([numberOfChannels, 0x00]), 0, 2, 22); // Number of channels
88
+ (0, node_fs_1.writeSync)(fd, new Uint8Array(numberTo32BiIntLittleEndian(sample_rate_1.DEFAULT_SAMPLE_RATE)), 0, 4, 24); // Sample rate
89
+ (0, node_fs_1.writeSync)(fd, new Uint8Array(numberTo32BiIntLittleEndian(sample_rate_1.DEFAULT_SAMPLE_RATE * numberOfChannels * BYTES_PER_SAMPLE)), 0, 4, 28); // Byte rate
90
+ (0, node_fs_1.writeSync)(fd, new Uint8Array(numberTo16BitLittleEndian(numberOfChannels * BYTES_PER_SAMPLE)), 0, 2, 32); // Block align
91
+ (0, node_fs_1.writeSync)(fd, numberTo16BitLittleEndian(BIT_DEPTH), 0, 2, 34); // Bits per sample
92
+ (0, node_fs_1.writeSync)(fd, new Uint8Array([0x64, 0x61, 0x74, 0x61]), 0, 4, 36); // "data"
93
+ (0, node_fs_1.writeSync)(fd, new Uint8Array(numberTo32BiIntLittleEndian(expectedDataSize)), 0, 4, 40); // Remaining size
94
+ };
95
+ const addAsset = (asset, fps, totalNumberOfFrames) => {
96
+ ensureAsset(asset, fps, totalNumberOfFrames);
97
+ const fileDescriptor = openFiles[asset.id];
98
+ const arr = new Int16Array(asset.audio);
99
+ (0, node_fs_1.writeSync)(
100
+ // fs
101
+ fileDescriptor,
102
+ // data
103
+ arr,
104
+ // offset of dats
105
+ 0,
106
+ // length
107
+ arr.byteLength,
108
+ // position
109
+ 44 +
110
+ Math.round((asset.frame / fps) *
111
+ asset.numberOfChannels *
112
+ sample_rate_1.DEFAULT_SAMPLE_RATE *
113
+ BYTES_PER_SAMPLE));
114
+ console.log('wrote', arr.byteLength, 'bytes to', node_path_1.default.join(folderToAdd, `${asset.id}.wav`), Math.round((asset.frame / fps) *
115
+ asset.numberOfChannels *
116
+ sample_rate_1.DEFAULT_SAMPLE_RATE *
117
+ BYTES_PER_SAMPLE));
118
+ };
119
+ return {
120
+ cleanup,
121
+ addAsset,
122
+ folder: folderToAdd,
123
+ };
124
+ };
125
+ exports.makeInlineAudioMixing = makeInlineAudioMixing;
@@ -16160,15 +16160,17 @@ var innerSetPropsAndEnv = async ({
16160
16160
  videoEnabled,
16161
16161
  indent,
16162
16162
  logLevel,
16163
- onServeUrlVisited
16163
+ onServeUrlVisited,
16164
+ isMainTab
16164
16165
  }) => {
16165
16166
  validatePuppeteerTimeout(timeoutInMilliseconds);
16166
16167
  const actualTimeout = timeoutInMilliseconds ?? DEFAULT_TIMEOUT;
16167
16168
  page.setDefaultTimeout(actualTimeout);
16168
16169
  page.setDefaultNavigationTimeout(actualTimeout);
16169
16170
  const urlToVisit = normalizeServeUrl(serveUrl);
16170
- await page.evaluateOnNewDocument((timeout) => {
16171
+ await page.evaluateOnNewDocument((timeout, mainTab) => {
16171
16172
  window.remotion_puppeteerTimeout = timeout;
16173
+ window.remotion_isMainTab = mainTab;
16172
16174
  if (window.process === undefined) {
16173
16175
  window.process = {};
16174
16176
  }
@@ -16176,7 +16178,8 @@ var innerSetPropsAndEnv = async ({
16176
16178
  window.process.env = {};
16177
16179
  }
16178
16180
  window.process.env.NODE_ENV = "production";
16179
- }, actualTimeout);
16181
+ }, actualTimeout, isMainTab);
16182
+ await page.evaluateOnNewDocument('window.remotion_broadcastChannel = new BroadcastChannel("remotion-video-frame-extraction")');
16180
16183
  if (envVariables) {
16181
16184
  await page.evaluateOnNewDocument((input) => {
16182
16185
  window.remotion_envVariables = input;
@@ -16225,7 +16228,8 @@ var innerSetPropsAndEnv = async ({
16225
16228
  videoEnabled,
16226
16229
  indent,
16227
16230
  logLevel,
16228
- onServeUrlVisited
16231
+ onServeUrlVisited,
16232
+ isMainTab
16229
16233
  });
16230
16234
  };
16231
16235
  const [pageRes, error] = await gotoPageOrThrow(page, urlToVisit, actualTimeout);
@@ -16493,7 +16497,8 @@ var innerGetCompositions = async ({
16493
16497
  logLevel,
16494
16498
  onServeUrlVisited: () => {
16495
16499
  return;
16496
- }
16500
+ },
16501
+ isMainTab: true
16497
16502
  });
16498
16503
  await puppeteerEvaluateWithCatch({
16499
16504
  page,
@@ -17649,7 +17654,8 @@ var makePage = async ({
17649
17654
  serializedInputPropsWithCustomSchema,
17650
17655
  imageFormat,
17651
17656
  serializedResolvedPropsWithCustomSchema,
17652
- pageIndex
17657
+ pageIndex,
17658
+ isMainTab
17653
17659
  }) => {
17654
17660
  const page = await browserReplacer.getBrowser().newPage({ context, logLevel, indent, pageIndex, onBrowserLog });
17655
17661
  pagesArray.push(page);
@@ -17673,7 +17679,8 @@ var makePage = async ({
17673
17679
  logLevel,
17674
17680
  onServeUrlVisited: () => {
17675
17681
  return;
17676
- }
17682
+ },
17683
+ isMainTab
17677
17684
  });
17678
17685
  await puppeteerEvaluateWithCatch({
17679
17686
  pageFunction: (id, props, durationInFrames, fps, height, width, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat) => {
@@ -18634,7 +18641,8 @@ var innerRenderFrames = async ({
18634
18641
  serializedResolvedPropsWithCustomSchema,
18635
18642
  serveUrl,
18636
18643
  timeoutInMilliseconds,
18637
- pageIndex
18644
+ pageIndex,
18645
+ isMainTab: pageIndex === 0
18638
18646
  });
18639
18647
  };
18640
18648
  const getPool = async () => {
@@ -21791,7 +21799,8 @@ var innerRenderStill = async ({
21791
21799
  logLevel,
21792
21800
  onServeUrlVisited: () => {
21793
21801
  return;
21794
- }
21802
+ },
21803
+ isMainTab: true
21795
21804
  });
21796
21805
  await puppeteerEvaluateWithCatch({
21797
21806
  pageFunction: (id, props, durationInFrames, fps, height, width, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat) => {
@@ -22018,7 +22027,8 @@ var innerSelectComposition = async ({
22018
22027
  videoEnabled: false,
22019
22028
  indent,
22020
22029
  logLevel,
22021
- onServeUrlVisited
22030
+ onServeUrlVisited,
22031
+ isMainTab: true
22022
22032
  });
22023
22033
  await puppeteerEvaluateWithCatch({
22024
22034
  page,
@@ -30,6 +30,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
30
30
  indent,
31
31
  logLevel,
32
32
  onServeUrlVisited: () => undefined,
33
+ isMainTab: true,
33
34
  });
34
35
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
35
36
  page,
@@ -5,7 +5,7 @@ import type { SourceMapGetter } from './browser/source-map-getter';
5
5
  import type { VideoImageFormat } from './image-format';
6
6
  import type { LogLevel } from './log-level';
7
7
  import type { BrowserReplacer } from './replace-browser';
8
- export declare const makePage: ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, }: {
8
+ export declare const makePage: ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, }: {
9
9
  context: SourceMapGetter;
10
10
  initialFrame: number;
11
11
  browserReplacer: BrowserReplacer;
@@ -24,4 +24,5 @@ export declare const makePage: ({ context, initialFrame, browserReplacer, logLev
24
24
  serializedResolvedPropsWithCustomSchema: string;
25
25
  imageFormat: VideoImageFormat;
26
26
  pageIndex: number;
27
+ isMainTab: boolean;
27
28
  }) => Promise<Page>;
package/dist/make-page.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makePage = void 0;
4
4
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
5
5
  const set_props_and_env_1 = require("./set-props-and-env");
6
- const makePage = async ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, }) => {
6
+ const makePage = async ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, }) => {
7
7
  const page = await browserReplacer
8
8
  .getBrowser()
9
9
  .newPage({ context, logLevel, indent, pageIndex, onBrowserLog });
@@ -27,6 +27,7 @@ const makePage = async ({ context, initialFrame, browserReplacer, logLevel, inde
27
27
  indent,
28
28
  logLevel,
29
29
  onServeUrlVisited: () => undefined,
30
+ isMainTab,
30
31
  });
31
32
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
32
33
  // eslint-disable-next-line max-params
@@ -73,6 +73,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
73
73
  serveUrl,
74
74
  timeoutInMilliseconds,
75
75
  pageIndex,
76
+ isMainTab: pageIndex === 0,
76
77
  });
77
78
  };
78
79
  const getPool = async () => {
@@ -158,6 +158,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
158
158
  indent,
159
159
  logLevel,
160
160
  onServeUrlVisited: () => undefined,
161
+ isMainTab: true,
161
162
  });
162
163
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
163
164
  // eslint-disable-next-line max-params
@@ -30,6 +30,7 @@ const innerSelectComposition = async ({ page, serializedInputPropsWithCustomSche
30
30
  indent,
31
31
  logLevel,
32
32
  onServeUrlVisited,
33
+ isMainTab: true,
33
34
  });
34
35
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
35
36
  page,
@@ -14,6 +14,7 @@ type SetPropsAndEnv = {
14
14
  indent: boolean;
15
15
  logLevel: LogLevel;
16
16
  onServeUrlVisited: () => void;
17
+ isMainTab: boolean;
17
18
  };
18
19
  export declare const setPropsAndEnv: (params: SetPropsAndEnv) => Promise<unknown>;
19
20
  export {};
@@ -10,15 +10,16 @@ const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
10
10
  const redirect_status_codes_1 = require("./redirect-status-codes");
11
11
  const truthy_1 = require("./truthy");
12
12
  const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
13
- const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, indent, logLevel, onServeUrlVisited, }) => {
13
+ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, indent, logLevel, onServeUrlVisited, isMainTab, }) => {
14
14
  (0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
15
15
  const actualTimeout = timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT;
16
16
  page.setDefaultTimeout(actualTimeout);
17
17
  page.setDefaultNavigationTimeout(actualTimeout);
18
18
  const urlToVisit = (0, normalize_serve_url_1.normalizeServeUrl)(serveUrl);
19
- await page.evaluateOnNewDocument((timeout) => {
19
+ await page.evaluateOnNewDocument((timeout, mainTab) => {
20
20
  window.remotion_puppeteerTimeout = timeout;
21
- // To make getRemotionEnvironment() work
21
+ window.remotion_isMainTab = mainTab;
22
+ // To make useRemotionEnvironment() work
22
23
  if (window.process === undefined) {
23
24
  // @ts-expect-error
24
25
  window.process = {};
@@ -27,7 +28,8 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
27
28
  window.process.env = {};
28
29
  }
29
30
  window.process.env.NODE_ENV = 'production';
30
- }, actualTimeout);
31
+ }, actualTimeout, isMainTab);
32
+ await page.evaluateOnNewDocument('window.remotion_broadcastChannel = new BroadcastChannel("remotion-video-frame-extraction")');
31
33
  if (envVariables) {
32
34
  await page.evaluateOnNewDocument((input) => {
33
35
  window.remotion_envVariables = input;
@@ -79,6 +81,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
79
81
  indent,
80
82
  logLevel,
81
83
  onServeUrlVisited,
84
+ isMainTab,
82
85
  });
83
86
  };
84
87
  const [pageRes, error] = await (0, goto_page_or_throw_1.gotoPageOrThrow)(page, urlToVisit, actualTimeout);
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
18
18
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
19
19
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
 
21
- // ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
21
+ // ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
22
22
  var require_ms = __commonJS((exports, module) => {
23
23
  var s = 1000;
24
24
  var m = s * 60;
@@ -128,7 +128,7 @@ var require_ms = __commonJS((exports, module) => {
128
128
  }
129
129
  });
130
130
 
131
- // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
131
+ // ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js
132
132
  var require_common = __commonJS((exports, module) => {
133
133
  function setup(env) {
134
134
  createDebug.debug = createDebug;
@@ -230,50 +230,64 @@ var require_common = __commonJS((exports, module) => {
230
230
  createDebug.namespaces = namespaces;
231
231
  createDebug.names = [];
232
232
  createDebug.skips = [];
233
- let i;
234
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
235
- const len = split.length;
236
- for (i = 0;i < len; i++) {
237
- if (!split[i]) {
238
- continue;
233
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
234
+ for (const ns of split) {
235
+ if (ns[0] === "-") {
236
+ createDebug.skips.push(ns.slice(1));
237
+ } else {
238
+ createDebug.names.push(ns);
239
239
  }
240
- namespaces = split[i].replace(/\*/g, ".*?");
241
- if (namespaces[0] === "-") {
242
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
240
+ }
241
+ }
242
+ function matchesTemplate(search, template) {
243
+ let searchIndex = 0;
244
+ let templateIndex = 0;
245
+ let starIndex = -1;
246
+ let matchIndex = 0;
247
+ while (searchIndex < search.length) {
248
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
249
+ if (template[templateIndex] === "*") {
250
+ starIndex = templateIndex;
251
+ matchIndex = searchIndex;
252
+ templateIndex++;
253
+ } else {
254
+ searchIndex++;
255
+ templateIndex++;
256
+ }
257
+ } else if (starIndex !== -1) {
258
+ templateIndex = starIndex + 1;
259
+ matchIndex++;
260
+ searchIndex = matchIndex;
243
261
  } else {
244
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
262
+ return false;
245
263
  }
246
264
  }
265
+ while (templateIndex < template.length && template[templateIndex] === "*") {
266
+ templateIndex++;
267
+ }
268
+ return templateIndex === template.length;
247
269
  }
248
270
  function disable() {
249
271
  const namespaces = [
250
- ...createDebug.names.map(toNamespace),
251
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
272
+ ...createDebug.names,
273
+ ...createDebug.skips.map((namespace) => "-" + namespace)
252
274
  ].join(",");
253
275
  createDebug.enable("");
254
276
  return namespaces;
255
277
  }
256
278
  function enabled(name) {
257
- if (name[name.length - 1] === "*") {
258
- return true;
259
- }
260
- let i;
261
- let len;
262
- for (i = 0, len = createDebug.skips.length;i < len; i++) {
263
- if (createDebug.skips[i].test(name)) {
279
+ for (const skip of createDebug.skips) {
280
+ if (matchesTemplate(name, skip)) {
264
281
  return false;
265
282
  }
266
283
  }
267
- for (i = 0, len = createDebug.names.length;i < len; i++) {
268
- if (createDebug.names[i].test(name)) {
284
+ for (const ns of createDebug.names) {
285
+ if (matchesTemplate(name, ns)) {
269
286
  return true;
270
287
  }
271
288
  }
272
289
  return false;
273
290
  }
274
- function toNamespace(regexp) {
275
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
276
- }
277
291
  function coerce(val) {
278
292
  if (val instanceof Error) {
279
293
  return val.stack || val.message;
@@ -289,7 +303,7 @@ var require_common = __commonJS((exports, module) => {
289
303
  module.exports = setup;
290
304
  });
291
305
 
292
- // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
306
+ // ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js
293
307
  var require_browser = __commonJS((exports, module) => {
294
308
  exports.formatArgs = formatArgs;
295
309
  exports.save = save;
@@ -390,7 +404,8 @@ var require_browser = __commonJS((exports, module) => {
390
404
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
391
405
  return false;
392
406
  }
393
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
407
+ let m;
408
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
394
409
  }
395
410
  function formatArgs(args) {
396
411
  args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
@@ -557,7 +572,7 @@ var require_supports_color = __commonJS((exports, module) => {
557
572
  };
558
573
  });
559
574
 
560
- // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
575
+ // ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js
561
576
  var require_node = __commonJS((exports, module) => {
562
577
  var tty = __require("tty");
563
578
  var util = __require("util");
@@ -695,7 +710,7 @@ var require_node = __commonJS((exports, module) => {
695
710
  return new Date().toISOString() + " ";
696
711
  }
697
712
  function log(...args) {
698
- return process.stderr.write(util.format(...args) + `
713
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
699
714
  `);
700
715
  }
701
716
  function save(namespaces) {
@@ -728,7 +743,7 @@ var require_node = __commonJS((exports, module) => {
728
743
  };
729
744
  });
730
745
 
731
- // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
746
+ // ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js
732
747
  var require_src = __commonJS((exports, module) => {
733
748
  if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
734
749
  module.exports = require_browser();
@@ -3071,14 +3086,17 @@ var getDownloadsCacheDir = () => {
3071
3086
  };
3072
3087
 
3073
3088
  // src/browser/BrowserFetcher.ts
3074
- var TESTED_VERSION = "133.0.6943.0";
3075
- var PLAYWRIGHT_VERSION = "1155";
3089
+ var TESTED_VERSION = "134.0.6998.35";
3090
+ var PLAYWRIGHT_VERSION = "1161";
3076
3091
  function getChromeDownloadUrl({
3077
3092
  platform: platform2,
3078
3093
  version,
3079
3094
  chromeMode
3080
3095
  }) {
3081
3096
  if (platform2 === "linux-arm64") {
3097
+ if (chromeMode === "chrome-for-testing") {
3098
+ return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-linux-arm64.zip`;
3099
+ }
3082
3100
  return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
3083
3101
  }
3084
3102
  if (chromeMode === "headless-shell") {
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.341",
6
+ "version": "4.0.345",
7
7
  "description": "Render Remotion videos using Node.js or Bun",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -18,8 +18,8 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.17.1",
21
- "remotion": "4.0.341",
22
- "@remotion/streaming": "4.0.341"
21
+ "remotion": "4.0.345",
22
+ "@remotion/streaming": "4.0.345"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=16.8.0",
@@ -33,17 +33,17 @@
33
33
  "react-dom": "19.0.0",
34
34
  "@types/ws": "8.5.10",
35
35
  "eslint": "9.19.0",
36
- "@remotion/example-videos": "4.0.341",
37
- "@remotion/eslint-config-internal": "4.0.341"
36
+ "@remotion/eslint-config-internal": "4.0.345",
37
+ "@remotion/example-videos": "4.0.345"
38
38
  },
39
39
  "optionalDependencies": {
40
- "@remotion/compositor-darwin-arm64": "4.0.341",
41
- "@remotion/compositor-linux-arm64-musl": "4.0.341",
42
- "@remotion/compositor-linux-x64-gnu": "4.0.341",
43
- "@remotion/compositor-linux-x64-musl": "4.0.341",
44
- "@remotion/compositor-win32-x64-msvc": "4.0.341",
45
- "@remotion/compositor-linux-arm64-gnu": "4.0.341",
46
- "@remotion/compositor-darwin-x64": "4.0.341"
40
+ "@remotion/compositor-darwin-arm64": "4.0.345",
41
+ "@remotion/compositor-darwin-x64": "4.0.345",
42
+ "@remotion/compositor-linux-arm64-gnu": "4.0.345",
43
+ "@remotion/compositor-linux-arm64-musl": "4.0.345",
44
+ "@remotion/compositor-linux-x64-gnu": "4.0.345",
45
+ "@remotion/compositor-linux-x64-musl": "4.0.345",
46
+ "@remotion/compositor-win32-x64-msvc": "4.0.345"
47
47
  },
48
48
  "keywords": [
49
49
  "remotion",