@remotion/renderer 4.0.0-fastlambda.3 → 4.0.0-fastlambda.31

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.
@@ -1,7 +1,4 @@
1
1
  export declare const createFfmpegComplexFilter: (filters: number) => Promise<{
2
- complexFilterFlag: [
3
- string,
4
- string
5
- ] | null;
2
+ complexFilterFlag: [string, string] | null;
6
3
  cleanup: () => void;
7
4
  }>;
@@ -1,6 +1,6 @@
1
1
  import puppeteer from 'puppeteer-core';
2
2
  import { Browser } from 'remotion';
3
- declare const validRenderers: readonly ["angle", "egl", "swiftshader"];
3
+ declare const validRenderers: readonly ["swangle", "angle", "egl", "swiftshader"];
4
4
  declare type OpenGlRenderer = typeof validRenderers[number];
5
5
  export declare type ChromiumOptions = {
6
6
  ignoreCertificateErrors?: boolean;
@@ -10,11 +10,17 @@ const path_1 = __importDefault(require("path"));
10
10
  const puppeteer_core_1 = __importDefault(require("puppeteer-core"));
11
11
  const remotion_1 = require("remotion");
12
12
  const get_local_browser_executable_1 = require("./get-local-browser-executable");
13
- const validRenderers = ['angle', 'egl', 'swiftshader'];
13
+ const validRenderers = ['swangle', 'angle', 'egl', 'swiftshader'];
14
14
  const getOpenGlRenderer = (option) => {
15
15
  const renderer = option !== null && option !== void 0 ? option : remotion_1.Internals.DEFAULT_OPENGL_RENDERER;
16
16
  remotion_1.Internals.validateOpenGlRenderer(renderer);
17
- return renderer;
17
+ if (renderer === 'swangle') {
18
+ return [`--use-gl=angle`, `--use-angle=swiftshader`];
19
+ }
20
+ if (renderer === null) {
21
+ return [];
22
+ }
23
+ return [`--use-gl=${renderer}`];
18
24
  };
19
25
  const browserInstances = [];
20
26
  const killAllBrowsers = async () => {
@@ -27,20 +33,21 @@ const killAllBrowsers = async () => {
27
33
  };
28
34
  exports.killAllBrowsers = killAllBrowsers;
29
35
  const openBrowser = async (browser, options) => {
30
- var _a, _b, _c, _d, _e, _f, _g;
36
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
31
37
  if (browser === 'firefox' && !remotion_1.Internals.FEATURE_FLAG_FIREFOX_SUPPORT) {
32
38
  throw new TypeError('Firefox supported is not yet turned on. Stay tuned for the future.');
33
39
  }
34
40
  await (0, get_local_browser_executable_1.ensureLocalBrowser)(browser, (_a = options === null || options === void 0 ? void 0 : options.browserExecutable) !== null && _a !== void 0 ? _a : null);
35
41
  const executablePath = (0, get_local_browser_executable_1.getLocalBrowserExecutable)(browser, (_b = options === null || options === void 0 ? void 0 : options.browserExecutable) !== null && _b !== void 0 ? _b : null);
36
42
  const customGlRenderer = getOpenGlRenderer((_d = (_c = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _c === void 0 ? void 0 : _c.gl) !== null && _d !== void 0 ? _d : null);
43
+ console.log({ customGlRenderer });
37
44
  const browserInstance = await puppeteer_core_1.default.launch({
38
45
  executablePath,
39
46
  product: browser,
40
47
  dumpio: (_e = options === null || options === void 0 ? void 0 : options.shouldDumpIo) !== null && _e !== void 0 ? _e : false,
41
- headless: false,
42
48
  ignoreDefaultArgs: true,
43
49
  args: [
50
+ 'about:blank',
44
51
  '--allow-pre-commit-input',
45
52
  '--disable-background-networking',
46
53
  '--enable-features=NetworkService,NetworkServiceInProcess',
@@ -52,6 +59,9 @@ const openBrowser = async (browser, options) => {
52
59
  '--disable-default-apps',
53
60
  '--disable-dev-shm-usage',
54
61
  '--disable-extensions',
62
+ '--no-proxy-server',
63
+ "--proxy-server='direct://'",
64
+ '--proxy-bypass-list=*',
55
65
  // TODO: remove AvoidUnnecessaryBeforeUnloadCheckSync below
56
66
  // once crbug.com/1324138 is fixed and released.
57
67
  '--disable-features=Translate,BackForwardCache,AvoidUnnecessaryBeforeUnloadCheckSync',
@@ -67,19 +77,15 @@ const openBrowser = async (browser, options) => {
67
77
  '--enable-automation',
68
78
  '--password-store=basic',
69
79
  '--use-mock-keychain',
70
- (options === null || options === void 0 ? void 0 : options.forceDeviceScaleFactor)
71
- ? `--force-device-scale-factor=${options.forceDeviceScaleFactor}`
72
- : null,
73
80
  // TODO(sadym): remove '--enable-blink-features=IdleDetection'
74
81
  // once IdleDetection is turned on by default.
75
82
  '--enable-blink-features=IdleDetection',
76
83
  '--export-tagged-pdf',
77
84
  '--intensive-wake-up-throttling-policy=0',
78
- '--headless',
85
+ ((_g = (_f = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _f === void 0 ? void 0 : _f.headless) !== null && _g !== void 0 ? _g : true) ? '--headless' : null,
79
86
  '--no-sandbox',
80
87
  '--disable-setuid-sandbox',
81
- '--disable-dev-shm-usage',
82
- customGlRenderer ? `--use-gl=${customGlRenderer}` : null,
88
+ ...customGlRenderer,
83
89
  '--disable-background-media-suspend',
84
90
  process.platform === 'linux' ? '--single-process' : null,
85
91
  '--allow-running-insecure-content',
@@ -88,15 +94,18 @@ const openBrowser = async (browser, options) => {
88
94
  '--disable-features=AudioServiceOutOfProcess,IsolateOrigins,site-per-process',
89
95
  '--disable-print-preview',
90
96
  '--disable-site-isolation-trials',
91
- '--disk-cache-size=33554432',
97
+ '--disk-cache-size=268435456',
92
98
  '--hide-scrollbars',
93
99
  '--no-default-browser-check',
94
100
  '--no-pings',
95
101
  '--no-zygote',
96
- ((_f = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _f === void 0 ? void 0 : _f.ignoreCertificateErrors)
102
+ (options === null || options === void 0 ? void 0 : options.forceDeviceScaleFactor)
103
+ ? `--force-device-scale-factor=${options.forceDeviceScaleFactor}`
104
+ : null,
105
+ ((_h = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _h === void 0 ? void 0 : _h.ignoreCertificateErrors)
97
106
  ? '--ignore-certificate-errors'
98
107
  : null,
99
- ...(((_g = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _g === void 0 ? void 0 : _g.disableWebSecurity)
108
+ ...(((_j = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _j === void 0 ? void 0 : _j.disableWebSecurity)
100
109
  ? [
101
110
  '--disable-web-security',
102
111
  '--user-data-dir=' +
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import puppeteer from 'puppeteer-core';
2
3
  import { ImageFormat } from 'remotion';
3
4
  export declare const provideScreenshot: ({ page, imageFormat, options, quality, }: {
@@ -1,2 +1,3 @@
1
+ /// <reference types="node" />
1
2
  import { Page, ScreenshotOptions } from 'puppeteer-core';
2
3
  export declare const screenshot: (page: Page, options?: ScreenshotOptions) => Promise<Buffer | string | void>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import puppeteer from 'puppeteer-core';
2
3
  import { ImageFormat } from 'remotion';
3
4
  export declare const screenshotDOMElement: ({ page, imageFormat, quality, opts, }: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { Page, ScreenshotOptions } from 'puppeteer-core';
2
3
  import { StillImageFormat } from 'remotion';
3
4
  export declare const _screenshotTask: (page: Page, format: StillImageFormat, options: ScreenshotOptions) => Promise<Buffer | string>;
@@ -24,9 +24,9 @@ const setPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initia
24
24
  window.remotion_envVariables = input;
25
25
  }, [JSON.stringify(envVariables)]);
26
26
  }
27
- await page.evaluateOnNewDocument((key, value) => {
28
- window.localStorage.setItem(key, value);
29
- }, [remotion_1.Internals.INITIAL_FRAME_LOCAL_STORAGE_KEY, initialFrame]);
27
+ await page.evaluateOnNewDocument((key) => {
28
+ window.remotion_initialFrame = key;
29
+ }, [initialFrame]);
30
30
  const pageRes = await page.goto(urlToVisit);
31
31
  const status = pageRes.status();
32
32
  if (status !== 200 &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.0-fastlambda.3+58f892c91",
3
+ "version": "4.0.0-fastlambda.31+442e0f4fe",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,10 +20,10 @@
20
20
  "url": "https://github.com/remotion-dev/remotion/issues"
21
21
  },
22
22
  "dependencies": {
23
- "@remotion/bundler": "4.0.0-fastlambda.3+58f892c91",
23
+ "@remotion/bundler": "4.0.0-fastlambda.31+442e0f4fe",
24
24
  "execa": "5.1.1",
25
25
  "puppeteer-core": "13.5.1",
26
- "remotion": "4.0.0-fastlambda.3+58f892c91",
26
+ "remotion": "4.0.0-fastlambda.31+442e0f4fe",
27
27
  "serve-handler": "6.1.3",
28
28
  "source-map": "^0.8.0-beta.0"
29
29
  },
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "58f892c915490a9b59ccba65f146a5e6a05f9d80"
63
+ "gitHead": "442e0f4fe3122ea86e62f93d777adc10365a27f2"
64
64
  }