71 lines
2.9 KiB
JavaScript
71 lines
2.9 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.processStill = void 0;
|
|
const client_1 = require("@remotion/renderer/client");
|
|
const preview_server_1 = require("../config/preview-server");
|
|
const convert_entry_point_to_serve_url_1 = require("../convert-entry-point-to-serve-url");
|
|
const get_cli_options_1 = require("../get-cli-options");
|
|
const parsed_cli_1 = require("../parsed-cli");
|
|
const still_1 = require("../render-flows/still");
|
|
const { publicDirOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
|
|
const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, }) => {
|
|
if (job.type !== 'still') {
|
|
throw new Error('Expected still job');
|
|
}
|
|
const { browserExecutable } = (0, get_cli_options_1.getCliOptions)({
|
|
isStill: true,
|
|
logLevel: job.logLevel,
|
|
indent: true,
|
|
});
|
|
const publicDir = publicDirOption.getValue({
|
|
commandLine: parsed_cli_1.parsedCli,
|
|
}).value;
|
|
const askAIEnabled = askAIOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
const experimentalClientSideRenderingEnabled = experimentalClientSideRenderingOption.getValue({
|
|
commandLine: parsed_cli_1.parsedCli,
|
|
}).value;
|
|
const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
|
|
commandLine: parsed_cli_1.parsedCli,
|
|
}).value;
|
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(entryPoint);
|
|
await (0, still_1.renderStillFlow)({
|
|
remotionRoot,
|
|
browser: 'chrome',
|
|
browserExecutable,
|
|
chromiumOptions: job.chromiumOptions,
|
|
entryPointReason: 'same as Studio',
|
|
envVariables: job.envVariables,
|
|
height: null,
|
|
fullEntryPoint,
|
|
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
overwrite: true,
|
|
port: (0, preview_server_1.getRendererPortFromConfigFile)(),
|
|
publicDir,
|
|
puppeteerTimeout: job.delayRenderTimeout,
|
|
jpegQuality: job.jpegQuality,
|
|
remainingArgs: [],
|
|
scale: job.scale,
|
|
stillFrame: job.frame,
|
|
width: null,
|
|
compositionIdFromUi: job.compositionId,
|
|
imageFormatFromUi: job.imageFormat,
|
|
logLevel: job.logLevel,
|
|
onProgress,
|
|
indent: true,
|
|
addCleanupCallback,
|
|
cancelSignal: job.cancelToken.cancelSignal,
|
|
outputLocationFromUi: job.outName,
|
|
offthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
offthreadVideoThreads: job.offthreadVideoThreads,
|
|
binariesDirectory: job.binariesDirectory,
|
|
publicPath: null,
|
|
chromeMode: job.chromeMode,
|
|
audioLatencyHint: null,
|
|
mediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
askAIEnabled,
|
|
experimentalClientSideRenderingEnabled,
|
|
keyboardShortcutsEnabled,
|
|
});
|
|
};
|
|
exports.processStill = processStill;
|