init commit
This commit is contained in:
51
remotion/node_modules/@remotion/renderer/dist/options/chrome-mode.js
generated
vendored
Normal file
51
remotion/node_modules/@remotion/renderer/dist/options/chrome-mode.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.chromeModeOption = exports.validChromeModeOptions = void 0;
|
||||
const jsx_runtime_1 = require("react/jsx-runtime");
|
||||
exports.validChromeModeOptions = [
|
||||
'headless-shell',
|
||||
'chrome-for-testing',
|
||||
];
|
||||
const cliFlag = 'chrome-mode';
|
||||
let configSelection = null;
|
||||
exports.chromeModeOption = {
|
||||
cliFlag,
|
||||
name: 'Chrome Mode',
|
||||
ssrName: 'chromeMode',
|
||||
description: () => {
|
||||
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["One of", ' ', exports.validChromeModeOptions.map((option, i) => (jsx_runtime_1.jsxs("code", { children: [option, i === exports.validChromeModeOptions.length - 1 ? '' : ', '] }, option))), ". Default ",
|
||||
jsx_runtime_1.jsx("code", { children: "headless-shell" }),
|
||||
".", ' ', jsx_runtime_1.jsxs("a", { href: "https://remotion.dev/docs/miscellaneous/chrome-headless-shell", children: ["Use ",
|
||||
jsx_runtime_1.jsx("code", { children: "chrome-for-testing" }),
|
||||
" to take advantage of GPU drivers on Linux."] })
|
||||
] }));
|
||||
},
|
||||
docLink: 'https://www.remotion.dev/chrome-for-testing',
|
||||
getValue: ({ commandLine }) => {
|
||||
if (commandLine[cliFlag]) {
|
||||
if (!exports.validChromeModeOptions.includes(commandLine[cliFlag])) {
|
||||
throw new Error(`Invalid \`--${cliFlag}\` value passed. Accepted values: ${exports.validChromeModeOptions
|
||||
.map((l) => `'${l}'`)
|
||||
.join(', ')}.`);
|
||||
}
|
||||
return {
|
||||
value: commandLine[cliFlag],
|
||||
source: 'cli',
|
||||
};
|
||||
}
|
||||
if (configSelection !== null) {
|
||||
return {
|
||||
value: configSelection,
|
||||
source: 'config',
|
||||
};
|
||||
}
|
||||
return {
|
||||
value: 'headless-shell',
|
||||
source: 'default',
|
||||
};
|
||||
},
|
||||
setConfig: (newChromeMode) => {
|
||||
configSelection = newChromeMode;
|
||||
},
|
||||
type: 'headless-shell',
|
||||
};
|
||||
Reference in New Issue
Block a user