@remotion/renderer 4.0.49 → 4.0.51
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.
- package/dist/client.d.ts +45 -37
- package/dist/client.js +2 -29
- package/dist/error-handling/handle-javascript-exception.d.ts +2 -1
- package/dist/error-handling/handle-javascript-exception.js +3 -1
- package/dist/error-handling/symbolicate-error.js +1 -0
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-silent-parts.d.ts +1 -1
- package/dist/index.d.ts +48 -47
- package/dist/index.js +9 -7
- package/dist/is-ipv6-supported.d.ts +1 -0
- package/dist/is-ipv6-supported.js +26 -0
- package/dist/logger.d.ts +1 -1
- package/dist/open-browser.d.ts +2 -2
- package/dist/open-browser.js +6 -10
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/gl.d.ts +13 -0
- package/dist/options/gl.js +36 -0
- package/dist/options/index.d.ts +123 -0
- package/dist/options/index.js +35 -0
- package/dist/serve-static.js +12 -5
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
- package/dist/validate-opengl-renderer.d.ts +0 -4
- package/dist/validate-opengl-renderer.js +0 -21
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const BrowserSafeApis: {
|
|
3
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
3
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
4
4
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
5
5
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
|
-
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
7
|
-
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
6
|
+
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
9
9
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
10
10
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
11
11
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
@@ -26,11 +26,11 @@ export declare const BrowserSafeApis: {
|
|
|
26
26
|
h264: {
|
|
27
27
|
default: import("./file-extensions").FileExtension;
|
|
28
28
|
forAudioCodec: {
|
|
29
|
-
|
|
29
|
+
mp3: {
|
|
30
30
|
possible: import("./file-extensions").FileExtension[];
|
|
31
31
|
default: import("./file-extensions").FileExtension;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
aac: {
|
|
34
34
|
possible: import("./file-extensions").FileExtension[];
|
|
35
35
|
default: import("./file-extensions").FileExtension;
|
|
36
36
|
};
|
|
@@ -56,11 +56,11 @@ export declare const BrowserSafeApis: {
|
|
|
56
56
|
vp8: {
|
|
57
57
|
default: import("./file-extensions").FileExtension;
|
|
58
58
|
forAudioCodec: {
|
|
59
|
-
|
|
59
|
+
"pcm-16": {
|
|
60
60
|
possible: import("./file-extensions").FileExtension[];
|
|
61
61
|
default: import("./file-extensions").FileExtension;
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
opus: {
|
|
64
64
|
possible: import("./file-extensions").FileExtension[];
|
|
65
65
|
default: import("./file-extensions").FileExtension;
|
|
66
66
|
};
|
|
@@ -69,20 +69,20 @@ export declare const BrowserSafeApis: {
|
|
|
69
69
|
vp9: {
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
forAudioCodec: {
|
|
72
|
-
|
|
72
|
+
"pcm-16": {
|
|
73
73
|
possible: import("./file-extensions").FileExtension[];
|
|
74
74
|
default: import("./file-extensions").FileExtension;
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
opus: {
|
|
77
77
|
possible: import("./file-extensions").FileExtension[];
|
|
78
78
|
default: import("./file-extensions").FileExtension;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
mp3: {
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
forAudioCodec: {
|
|
85
|
-
|
|
85
|
+
mp3: {
|
|
86
86
|
possible: import("./file-extensions").FileExtension[];
|
|
87
87
|
default: import("./file-extensions").FileExtension;
|
|
88
88
|
};
|
|
@@ -105,22 +105,22 @@ export declare const BrowserSafeApis: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
wav: {
|
|
109
109
|
default: import("./file-extensions").FileExtension;
|
|
110
110
|
forAudioCodec: {
|
|
111
|
-
mp3: {
|
|
112
|
-
possible: import("./file-extensions").FileExtension[];
|
|
113
|
-
default: import("./file-extensions").FileExtension;
|
|
114
|
-
};
|
|
115
111
|
"pcm-16": {
|
|
116
112
|
possible: import("./file-extensions").FileExtension[];
|
|
117
113
|
default: import("./file-extensions").FileExtension;
|
|
118
114
|
};
|
|
119
115
|
};
|
|
120
116
|
};
|
|
121
|
-
|
|
117
|
+
prores: {
|
|
122
118
|
default: import("./file-extensions").FileExtension;
|
|
123
119
|
forAudioCodec: {
|
|
120
|
+
aac: {
|
|
121
|
+
possible: import("./file-extensions").FileExtension[];
|
|
122
|
+
default: import("./file-extensions").FileExtension;
|
|
123
|
+
};
|
|
124
124
|
"pcm-16": {
|
|
125
125
|
possible: import("./file-extensions").FileExtension[];
|
|
126
126
|
default: import("./file-extensions").FileExtension;
|
|
@@ -147,37 +147,37 @@ export declare const BrowserSafeApis: {
|
|
|
147
147
|
};
|
|
148
148
|
defaultAudioCodecs: {
|
|
149
149
|
h264: {
|
|
150
|
-
compressed: "
|
|
151
|
-
lossless: "
|
|
150
|
+
compressed: "mp3" | "aac" | "pcm-16" | null;
|
|
151
|
+
lossless: "mp3" | "aac" | "pcm-16" | null;
|
|
152
152
|
};
|
|
153
153
|
h265: {
|
|
154
154
|
compressed: "aac" | "pcm-16" | null;
|
|
155
155
|
lossless: "aac" | "pcm-16" | null;
|
|
156
156
|
};
|
|
157
157
|
vp8: {
|
|
158
|
-
compressed: "
|
|
159
|
-
lossless: "
|
|
158
|
+
compressed: "pcm-16" | "opus" | null;
|
|
159
|
+
lossless: "pcm-16" | "opus" | null;
|
|
160
160
|
};
|
|
161
161
|
vp9: {
|
|
162
|
-
compressed: "
|
|
163
|
-
lossless: "
|
|
162
|
+
compressed: "pcm-16" | "opus" | null;
|
|
163
|
+
lossless: "pcm-16" | "opus" | null;
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
compressed: "
|
|
167
|
-
lossless: "
|
|
165
|
+
mp3: {
|
|
166
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
167
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
168
168
|
};
|
|
169
169
|
aac: {
|
|
170
170
|
compressed: "aac" | "pcm-16" | null;
|
|
171
171
|
lossless: "aac" | "pcm-16" | null;
|
|
172
172
|
};
|
|
173
|
-
mp3: {
|
|
174
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
175
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
176
|
-
};
|
|
177
173
|
wav: {
|
|
178
174
|
compressed: "pcm-16" | null;
|
|
179
175
|
lossless: "pcm-16" | null;
|
|
180
176
|
};
|
|
177
|
+
prores: {
|
|
178
|
+
compressed: "aac" | "pcm-16" | null;
|
|
179
|
+
lossless: "aac" | "pcm-16" | null;
|
|
180
|
+
};
|
|
181
181
|
"h264-mkv": {
|
|
182
182
|
compressed: "mp3" | "pcm-16" | null;
|
|
183
183
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -187,10 +187,10 @@ export declare const BrowserSafeApis: {
|
|
|
187
187
|
lossless: null;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
191
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
190
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
191
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
192
192
|
codec: T_1;
|
|
193
|
-
audioCodec: "
|
|
193
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
194
194
|
extension: string;
|
|
195
195
|
preferLossless: boolean;
|
|
196
196
|
}) => void;
|
|
@@ -281,7 +281,7 @@ export declare const BrowserSafeApis: {
|
|
|
281
281
|
description: () => JSX.Element;
|
|
282
282
|
docLink: string;
|
|
283
283
|
ssrName: string;
|
|
284
|
-
type: "
|
|
284
|
+
type: "default" | "bt709";
|
|
285
285
|
};
|
|
286
286
|
deleteAfterOption: {
|
|
287
287
|
name: string;
|
|
@@ -307,6 +307,14 @@ export declare const BrowserSafeApis: {
|
|
|
307
307
|
docLink: string;
|
|
308
308
|
type: boolean;
|
|
309
309
|
};
|
|
310
|
+
glOption: {
|
|
311
|
+
cliFlag: string;
|
|
312
|
+
docLink: string;
|
|
313
|
+
name: string;
|
|
314
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
315
|
+
ssrName: string;
|
|
316
|
+
description: () => JSX.Element;
|
|
317
|
+
};
|
|
310
318
|
};
|
|
311
319
|
validColorSpaces: readonly ["default", "bt709"];
|
|
312
320
|
optionsMap: {
|
|
@@ -391,6 +399,6 @@ export declare const BrowserSafeApis: {
|
|
|
391
399
|
type: number | null;
|
|
392
400
|
}];
|
|
393
401
|
};
|
|
394
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
395
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
402
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
403
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
396
404
|
};
|
package/dist/client.js
CHANGED
|
@@ -8,21 +8,9 @@ const crf_1 = require("./crf");
|
|
|
8
8
|
const file_extensions_1 = require("./file-extensions");
|
|
9
9
|
const get_extension_from_codec_1 = require("./get-extension-from-codec");
|
|
10
10
|
const is_audio_codec_1 = require("./is-audio-codec");
|
|
11
|
-
const
|
|
11
|
+
const options_1 = require("./options");
|
|
12
12
|
const color_space_1 = require("./options/color-space");
|
|
13
|
-
const crf_2 = require("./options/crf");
|
|
14
|
-
const delete_after_1 = require("./options/delete-after");
|
|
15
|
-
const enable_multiprocess_on_linux_1 = require("./options/enable-multiprocess-on-linux");
|
|
16
|
-
const enforce_audio_1 = require("./options/enforce-audio");
|
|
17
|
-
const folder_expiry_1 = require("./options/folder-expiry");
|
|
18
|
-
const jpeg_quality_1 = require("./options/jpeg-quality");
|
|
19
|
-
const mute_1 = require("./options/mute");
|
|
20
|
-
const offthreadvideo_cache_size_1 = require("./options/offthreadvideo-cache-size");
|
|
21
13
|
const options_map_1 = require("./options/options-map");
|
|
22
|
-
const scale_1 = require("./options/scale");
|
|
23
|
-
const video_bitrate_1 = require("./options/video-bitrate");
|
|
24
|
-
const video_codec_1 = require("./options/video-codec");
|
|
25
|
-
const webhook_custom_data_1 = require("./options/webhook-custom-data");
|
|
26
14
|
const pixel_format_1 = require("./pixel-format");
|
|
27
15
|
const prores_profile_1 = require("./prores-profile");
|
|
28
16
|
const validate_output_filename_1 = require("./validate-output-filename");
|
|
@@ -43,22 +31,7 @@ exports.BrowserSafeApis = {
|
|
|
43
31
|
defaultAudioCodecs: audio_codec_1.defaultAudioCodecs,
|
|
44
32
|
defaultCodecsForFileExtension: get_extension_from_codec_1.defaultCodecsForFileExtension,
|
|
45
33
|
validateOutputFilename: validate_output_filename_1.validateOutputFilename,
|
|
46
|
-
options:
|
|
47
|
-
scaleOption: scale_1.scaleOption,
|
|
48
|
-
crfOption: crf_2.crfOption,
|
|
49
|
-
jpegQualityOption: jpeg_quality_1.jpegQualityOption,
|
|
50
|
-
videoBitrate: video_bitrate_1.videoBitrate,
|
|
51
|
-
audioBitrateOption: audio_bitrate_1.audioBitrateOption,
|
|
52
|
-
enforceAudioOption: enforce_audio_1.enforceAudioOption,
|
|
53
|
-
muteOption: mute_1.muteOption,
|
|
54
|
-
videoCodecOption: video_codec_1.videoCodecOption,
|
|
55
|
-
offthreadVideoCacheSizeInBytesOption: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
56
|
-
webhookCustomDataOption: webhook_custom_data_1.webhookCustomDataOption,
|
|
57
|
-
colorSpaceOption: color_space_1.colorSpaceOption,
|
|
58
|
-
deleteAfterOption: delete_after_1.deleteAfterOption,
|
|
59
|
-
folderExpiryOption: folder_expiry_1.folderExpiryOption,
|
|
60
|
-
enableMultiprocessOnLinuxOption: enable_multiprocess_on_linux_1.enableMultiprocessOnLinuxOption,
|
|
61
|
-
},
|
|
34
|
+
options: options_1.allOptions,
|
|
62
35
|
validColorSpaces: color_space_1.validColorSpaces,
|
|
63
36
|
optionsMap: options_map_1.optionsMap,
|
|
64
37
|
codecSupportsCrf: codec_supports_media_1.codecSupportsCrf,
|
|
@@ -5,12 +5,13 @@ export declare class ErrorWithStackFrame extends Error {
|
|
|
5
5
|
frame: number | null;
|
|
6
6
|
name: string;
|
|
7
7
|
delayRenderCall: SymbolicatedStackFrame[] | null;
|
|
8
|
-
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }: {
|
|
8
|
+
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }: {
|
|
9
9
|
message: string;
|
|
10
10
|
symbolicatedStackFrames: SymbolicatedStackFrame[] | null;
|
|
11
11
|
frame: number | null;
|
|
12
12
|
name: string;
|
|
13
13
|
delayRenderCall: SymbolicatedStackFrame[] | null;
|
|
14
|
+
stack: string | undefined;
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
export declare const handleJavascriptException: ({ page, onError, frame, }: {
|
|
@@ -4,12 +4,14 @@ exports.handleJavascriptException = exports.ErrorWithStackFrame = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const symbolicateable_error_1 = require("./symbolicateable-error");
|
|
6
6
|
class ErrorWithStackFrame extends Error {
|
|
7
|
-
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }) {
|
|
7
|
+
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }) {
|
|
8
8
|
super(message);
|
|
9
9
|
this.symbolicatedStackFrames = symbolicatedStackFrames;
|
|
10
10
|
this.frame = frame;
|
|
11
11
|
this.name = name;
|
|
12
12
|
this.delayRenderCall = delayRenderCall;
|
|
13
|
+
// If error symbolication did not yield any stack frames, we print the original stack
|
|
14
|
+
this.stack = stack;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
exports.ErrorWithStackFrame = ErrorWithStackFrame;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
3
|
import type { FileExtension } from './file-extensions';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
|
@@ -3,6 +3,6 @@ import type { LogLevel } from './log-level';
|
|
|
3
3
|
export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }: {
|
|
4
4
|
src: string;
|
|
5
5
|
minDurationInSeconds?: number | undefined;
|
|
6
|
-
logLevel?: "
|
|
6
|
+
logLevel?: "error" | "verbose" | "info" | "warn" | undefined;
|
|
7
7
|
noiseThresholdInDecibels?: number | undefined;
|
|
8
8
|
}) => Promise<GetSilentPartsResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export { CancelSignal, makeCancelSignal } from './make-cancel-signal';
|
|
|
27
27
|
export { openBrowser } from './open-browser';
|
|
28
28
|
export type { ChromiumOptions } from './open-browser';
|
|
29
29
|
export { ColorSpace } from './options/color-space';
|
|
30
|
+
export { OpenGlRenderer } from './options/gl';
|
|
30
31
|
export { AnyRemotionOption, RemotionOption, ToOptions } from './options/option';
|
|
31
32
|
export { PixelFormat } from './pixel-format';
|
|
32
33
|
export { RemotionServer } from './prepare-server';
|
|
@@ -38,7 +39,6 @@ export { selectComposition, SelectCompositionOptions, } from './select-compositi
|
|
|
38
39
|
export { stitchFramesToVideo, StitchFramesToVideoOptions, } from './stitch-frames-to-video';
|
|
39
40
|
export { SymbolicatedStackFrame } from './symbolicate-stacktrace';
|
|
40
41
|
export { OnStartData, RenderFramesOutput } from './types';
|
|
41
|
-
export { OpenGlRenderer } from './validate-opengl-renderer';
|
|
42
42
|
export { validateOutputFilename } from './validate-output-filename';
|
|
43
43
|
export { X264Preset } from './x264-preset';
|
|
44
44
|
export declare const RenderInternals: {
|
|
@@ -49,7 +49,7 @@ export declare const RenderInternals: {
|
|
|
49
49
|
downloadMap: import("./assets/download-map").DownloadMap;
|
|
50
50
|
remotionRoot: string;
|
|
51
51
|
concurrency: number;
|
|
52
|
-
logLevel: "
|
|
52
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
53
53
|
indent: boolean;
|
|
54
54
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
55
55
|
}) => Promise<{
|
|
@@ -61,10 +61,10 @@ export declare const RenderInternals: {
|
|
|
61
61
|
width: number;
|
|
62
62
|
height: number;
|
|
63
63
|
scale: number;
|
|
64
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
64
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
65
65
|
wantsImageSequence: boolean;
|
|
66
66
|
}) => void;
|
|
67
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
67
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
68
68
|
tmpDir: (str: string) => string;
|
|
69
69
|
deleteDirectory: (directory: string) => void;
|
|
70
70
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -119,7 +119,7 @@ export declare const RenderInternals: {
|
|
|
119
119
|
};
|
|
120
120
|
registerErrorSymbolicationLock: () => number;
|
|
121
121
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
122
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
122
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
123
123
|
mimeContentType: typeof mimeContentType;
|
|
124
124
|
mimeLookup: typeof mimeLookup;
|
|
125
125
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -130,16 +130,16 @@ export declare const RenderInternals: {
|
|
|
130
130
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
131
131
|
DEFAULT_BROWSER: "chrome";
|
|
132
132
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
133
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
134
|
-
validateOpenGlRenderer: (option: "
|
|
133
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
134
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
135
135
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
136
136
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
137
137
|
validateJpegQuality: (q: number | undefined) => void;
|
|
138
138
|
DEFAULT_TIMEOUT: number;
|
|
139
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
140
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
139
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
140
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
141
141
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
142
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
142
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
143
143
|
isValidLogLevel: (level: string) => boolean;
|
|
144
144
|
perf: typeof perf;
|
|
145
145
|
convertToPositiveFrameIndex: ({ frame, durationInFrames, }: {
|
|
@@ -154,28 +154,28 @@ export declare const RenderInternals: {
|
|
|
154
154
|
output: string;
|
|
155
155
|
onProgress: (p: number) => void;
|
|
156
156
|
numberOfFrames: number;
|
|
157
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
157
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
158
158
|
fps: number;
|
|
159
159
|
numberOfGifLoops: number | null;
|
|
160
|
-
audioCodec: "
|
|
160
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
161
161
|
audioBitrate: string | null;
|
|
162
162
|
}) => Promise<void>;
|
|
163
163
|
getMinConcurrency: () => number;
|
|
164
164
|
getMaxConcurrency: () => number;
|
|
165
165
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
166
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
166
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
167
167
|
preferLossless: boolean;
|
|
168
|
-
}) => "
|
|
168
|
+
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
169
169
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
170
170
|
defaultFileExtensionMap: {
|
|
171
171
|
h264: {
|
|
172
172
|
default: import("./file-extensions").FileExtension;
|
|
173
173
|
forAudioCodec: {
|
|
174
|
-
|
|
174
|
+
mp3: {
|
|
175
175
|
possible: import("./file-extensions").FileExtension[];
|
|
176
176
|
default: import("./file-extensions").FileExtension;
|
|
177
177
|
};
|
|
178
|
-
|
|
178
|
+
aac: {
|
|
179
179
|
possible: import("./file-extensions").FileExtension[];
|
|
180
180
|
default: import("./file-extensions").FileExtension;
|
|
181
181
|
};
|
|
@@ -201,11 +201,11 @@ export declare const RenderInternals: {
|
|
|
201
201
|
vp8: {
|
|
202
202
|
default: import("./file-extensions").FileExtension;
|
|
203
203
|
forAudioCodec: {
|
|
204
|
-
|
|
204
|
+
"pcm-16": {
|
|
205
205
|
possible: import("./file-extensions").FileExtension[];
|
|
206
206
|
default: import("./file-extensions").FileExtension;
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
opus: {
|
|
209
209
|
possible: import("./file-extensions").FileExtension[];
|
|
210
210
|
default: import("./file-extensions").FileExtension;
|
|
211
211
|
};
|
|
@@ -214,20 +214,20 @@ export declare const RenderInternals: {
|
|
|
214
214
|
vp9: {
|
|
215
215
|
default: import("./file-extensions").FileExtension;
|
|
216
216
|
forAudioCodec: {
|
|
217
|
-
|
|
217
|
+
"pcm-16": {
|
|
218
218
|
possible: import("./file-extensions").FileExtension[];
|
|
219
219
|
default: import("./file-extensions").FileExtension;
|
|
220
220
|
};
|
|
221
|
-
|
|
221
|
+
opus: {
|
|
222
222
|
possible: import("./file-extensions").FileExtension[];
|
|
223
223
|
default: import("./file-extensions").FileExtension;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
mp3: {
|
|
228
228
|
default: import("./file-extensions").FileExtension;
|
|
229
229
|
forAudioCodec: {
|
|
230
|
-
|
|
230
|
+
mp3: {
|
|
231
231
|
possible: import("./file-extensions").FileExtension[];
|
|
232
232
|
default: import("./file-extensions").FileExtension;
|
|
233
233
|
};
|
|
@@ -250,22 +250,22 @@ export declare const RenderInternals: {
|
|
|
250
250
|
};
|
|
251
251
|
};
|
|
252
252
|
};
|
|
253
|
-
|
|
253
|
+
wav: {
|
|
254
254
|
default: import("./file-extensions").FileExtension;
|
|
255
255
|
forAudioCodec: {
|
|
256
|
-
mp3: {
|
|
257
|
-
possible: import("./file-extensions").FileExtension[];
|
|
258
|
-
default: import("./file-extensions").FileExtension;
|
|
259
|
-
};
|
|
260
256
|
"pcm-16": {
|
|
261
257
|
possible: import("./file-extensions").FileExtension[];
|
|
262
258
|
default: import("./file-extensions").FileExtension;
|
|
263
259
|
};
|
|
264
260
|
};
|
|
265
261
|
};
|
|
266
|
-
|
|
262
|
+
prores: {
|
|
267
263
|
default: import("./file-extensions").FileExtension;
|
|
268
264
|
forAudioCodec: {
|
|
265
|
+
aac: {
|
|
266
|
+
possible: import("./file-extensions").FileExtension[];
|
|
267
|
+
default: import("./file-extensions").FileExtension;
|
|
268
|
+
};
|
|
269
269
|
"pcm-16": {
|
|
270
270
|
possible: import("./file-extensions").FileExtension[];
|
|
271
271
|
default: import("./file-extensions").FileExtension;
|
|
@@ -302,8 +302,8 @@ export declare const RenderInternals: {
|
|
|
302
302
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
303
303
|
readonly wav: readonly ["pcm-16"];
|
|
304
304
|
};
|
|
305
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
306
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
305
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
306
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
307
307
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
|
|
308
308
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
309
309
|
dynamicLibraryPathOptions: () => {
|
|
@@ -320,8 +320,8 @@ export declare const RenderInternals: {
|
|
|
320
320
|
};
|
|
321
321
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
322
322
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
323
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
324
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
323
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
324
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
325
325
|
DEFAULT_JPEG_QUALITY: number;
|
|
326
326
|
chalk: {
|
|
327
327
|
enabled: () => boolean;
|
|
@@ -377,30 +377,30 @@ export declare const RenderInternals: {
|
|
|
377
377
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
378
378
|
verboseAdvanced: (options: {
|
|
379
379
|
indent: boolean;
|
|
380
|
-
logLevel: "
|
|
380
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
381
381
|
} & {
|
|
382
382
|
tag?: string | undefined;
|
|
383
383
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
384
384
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
385
385
|
infoAdvanced: (options: {
|
|
386
386
|
indent: boolean;
|
|
387
|
-
logLevel: "
|
|
387
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
388
388
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
389
389
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
390
390
|
warnAdvanced: (options: {
|
|
391
391
|
indent: boolean;
|
|
392
|
-
logLevel: "
|
|
392
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
393
393
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
394
394
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
395
395
|
errorAdvanced: (options: {
|
|
396
396
|
indent: boolean;
|
|
397
|
-
logLevel: "
|
|
397
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
398
398
|
} & {
|
|
399
399
|
tag?: string | undefined;
|
|
400
400
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
401
401
|
};
|
|
402
|
-
getLogLevel: () => "
|
|
403
|
-
setLogLevel: (newLogLevel: "
|
|
402
|
+
getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
403
|
+
setLogLevel: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
404
404
|
INDENT_TOKEN: string;
|
|
405
405
|
isColorSupported: () => boolean;
|
|
406
406
|
HeadlessBrowser: typeof HeadlessBrowser;
|
|
@@ -409,7 +409,7 @@ export declare const RenderInternals: {
|
|
|
409
409
|
port: number | null;
|
|
410
410
|
remotionRoot: string;
|
|
411
411
|
concurrency: number;
|
|
412
|
-
logLevel: "
|
|
412
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
413
413
|
indent: boolean;
|
|
414
414
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
415
415
|
}) => Promise<import("./prepare-server").RemotionServer>;
|
|
@@ -418,7 +418,7 @@ export declare const RenderInternals: {
|
|
|
418
418
|
port: number | null;
|
|
419
419
|
remotionRoot: string;
|
|
420
420
|
concurrency: number;
|
|
421
|
-
logLevel: "
|
|
421
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
422
422
|
indent: boolean;
|
|
423
423
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
424
424
|
}, { onDownload, onError, }: {
|
|
@@ -434,7 +434,7 @@ export declare const RenderInternals: {
|
|
|
434
434
|
frame: number;
|
|
435
435
|
serializedInputPropsWithCustomSchema: string;
|
|
436
436
|
serializedResolvedPropsWithCustomSchema: string;
|
|
437
|
-
imageFormat: "
|
|
437
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
438
438
|
jpegQuality: number;
|
|
439
439
|
puppeteerInstance: HeadlessBrowser | null;
|
|
440
440
|
envVariables: Record<string, string>;
|
|
@@ -448,7 +448,7 @@ export declare const RenderInternals: {
|
|
|
448
448
|
cancelSignal: import("./make-cancel-signal").CancelSignal | null;
|
|
449
449
|
indent: boolean;
|
|
450
450
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
451
|
-
logLevel: "
|
|
451
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
452
452
|
serveUrl: string;
|
|
453
453
|
port: number | null;
|
|
454
454
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
@@ -469,7 +469,7 @@ export declare const RenderInternals: {
|
|
|
469
469
|
viewport: import("./browser/PuppeteerViewport").Viewport | null;
|
|
470
470
|
indent: boolean;
|
|
471
471
|
browser: "chrome";
|
|
472
|
-
logLevel: "
|
|
472
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
473
473
|
}) => Promise<HeadlessBrowser>;
|
|
474
474
|
internalSelectComposition: (options: {
|
|
475
475
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -482,7 +482,7 @@ export declare const RenderInternals: {
|
|
|
482
482
|
port: number | null;
|
|
483
483
|
indent: boolean;
|
|
484
484
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
485
|
-
logLevel: "
|
|
485
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
486
486
|
serveUrl: string;
|
|
487
487
|
id: string;
|
|
488
488
|
} & import("./options/option").ToOptions<readonly [{
|
|
@@ -507,7 +507,7 @@ export declare const RenderInternals: {
|
|
|
507
507
|
port: number | null;
|
|
508
508
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
509
509
|
indent: boolean;
|
|
510
|
-
logLevel: "
|
|
510
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
511
511
|
serveUrlOrWebpackUrl: string;
|
|
512
512
|
} & import("./options/option").ToOptions<readonly [{
|
|
513
513
|
name: string;
|
|
@@ -522,6 +522,7 @@ export declare const RenderInternals: {
|
|
|
522
522
|
buffer: Buffer | null;
|
|
523
523
|
slowestFrames: import("./render-media").SlowFrame[];
|
|
524
524
|
}>;
|
|
525
|
-
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan"];
|
|
526
|
-
copyImageToClipboard: (src: string, logLevel: "
|
|
525
|
+
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
526
|
+
copyImageToClipboard: (src: string, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
|
|
527
|
+
isIpV6Supported: () => boolean;
|
|
527
528
|
};
|
package/dist/index.js
CHANGED
|
@@ -60,12 +60,14 @@ const get_local_browser_executable_1 = require("./get-local-browser-executable")
|
|
|
60
60
|
const get_port_1 = require("./get-port");
|
|
61
61
|
const image_format_1 = require("./image-format");
|
|
62
62
|
const is_audio_codec_1 = require("./is-audio-codec");
|
|
63
|
+
const is_ipv6_supported_1 = require("./is-ipv6-supported");
|
|
63
64
|
const is_serve_url_1 = require("./is-serve-url");
|
|
64
65
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
65
66
|
const log_level_1 = require("./log-level");
|
|
66
67
|
const logger_1 = require("./logger");
|
|
67
68
|
const mime_types_1 = require("./mime-types");
|
|
68
69
|
const open_browser_1 = require("./open-browser");
|
|
70
|
+
const gl_1 = require("./options/gl");
|
|
69
71
|
const parse_browser_error_stack_1 = require("./parse-browser-error-stack");
|
|
70
72
|
const perf = __importStar(require("./perf"));
|
|
71
73
|
const pixel_format_1 = require("./pixel-format");
|
|
@@ -79,10 +81,6 @@ const serve_static_1 = require("./serve-static");
|
|
|
79
81
|
const tmp_dir_1 = require("./tmp-dir");
|
|
80
82
|
const validate_concurrency_1 = require("./validate-concurrency");
|
|
81
83
|
const validate_even_dimensions_with_codec_1 = require("./validate-even-dimensions-with-codec");
|
|
82
|
-
const validate_opengl_renderer_1 = require("./validate-opengl-renderer");
|
|
83
|
-
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
84
|
-
const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
85
|
-
const wait_for_symbolication_error_to_be_done_1 = require("./wait-for-symbolication-error-to-be-done");
|
|
86
84
|
var handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
|
|
87
85
|
Object.defineProperty(exports, "ErrorWithStackFrame", { enumerable: true, get: function () { return handle_javascript_exception_1.ErrorWithStackFrame; } });
|
|
88
86
|
var extract_audio_1 = require("./extract-audio");
|
|
@@ -111,6 +109,9 @@ var stitch_frames_to_video_1 = require("./stitch-frames-to-video");
|
|
|
111
109
|
Object.defineProperty(exports, "stitchFramesToVideo", { enumerable: true, get: function () { return stitch_frames_to_video_1.stitchFramesToVideo; } });
|
|
112
110
|
var validate_output_filename_1 = require("./validate-output-filename");
|
|
113
111
|
Object.defineProperty(exports, "validateOutputFilename", { enumerable: true, get: function () { return validate_output_filename_1.validateOutputFilename; } });
|
|
112
|
+
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
113
|
+
const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
114
|
+
const wait_for_symbolication_error_to_be_done_1 = require("./wait-for-symbolication-error-to-be-done");
|
|
114
115
|
exports.RenderInternals = {
|
|
115
116
|
ensureLocalBrowser: get_local_browser_executable_1.ensureLocalBrowser,
|
|
116
117
|
getActualConcurrency: get_concurrency_1.getActualConcurrency,
|
|
@@ -142,8 +143,8 @@ exports.RenderInternals = {
|
|
|
142
143
|
validPixelFormats: pixel_format_1.validPixelFormats,
|
|
143
144
|
DEFAULT_BROWSER: browser_1.DEFAULT_BROWSER,
|
|
144
145
|
validateFrameRange: frame_range_1.validateFrameRange,
|
|
145
|
-
DEFAULT_OPENGL_RENDERER:
|
|
146
|
-
validateOpenGlRenderer:
|
|
146
|
+
DEFAULT_OPENGL_RENDERER: gl_1.DEFAULT_OPENGL_RENDERER,
|
|
147
|
+
validateOpenGlRenderer: gl_1.validateOpenGlRenderer,
|
|
147
148
|
validCodecs: codec_1.validCodecs,
|
|
148
149
|
DEFAULT_PIXEL_FORMAT: pixel_format_1.DEFAULT_PIXEL_FORMAT,
|
|
149
150
|
validateJpegQuality: jpeg_quality_1.validateJpegQuality,
|
|
@@ -189,8 +190,9 @@ exports.RenderInternals = {
|
|
|
189
190
|
internalGetCompositions: get_compositions_1.internalGetCompositions,
|
|
190
191
|
internalRenderFrames: render_frames_1.internalRenderFrames,
|
|
191
192
|
internalRenderMedia: render_media_1.internalRenderMedia,
|
|
192
|
-
validOpenGlRenderers:
|
|
193
|
+
validOpenGlRenderers: gl_1.validOpenGlRenderers,
|
|
193
194
|
copyImageToClipboard: copy_to_clipboard_1.copyImageToClipboard,
|
|
195
|
+
isIpV6Supported: is_ipv6_supported_1.isIpV6Supported,
|
|
194
196
|
};
|
|
195
197
|
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
|
|
196
198
|
(0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isIpV6Supported: () => boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isIpV6Supported = void 0;
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
let cache = null;
|
|
9
|
+
const calculate = () => {
|
|
10
|
+
const interfaces = os_1.default.networkInterfaces();
|
|
11
|
+
for (const iface in interfaces) {
|
|
12
|
+
for (const configuration of interfaces[iface]) {
|
|
13
|
+
if (configuration.family === 'IPv6' && !configuration.internal) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
20
|
+
const isIpV6Supported = () => {
|
|
21
|
+
if (cache === null) {
|
|
22
|
+
cache = calculate();
|
|
23
|
+
}
|
|
24
|
+
return cache;
|
|
25
|
+
};
|
|
26
|
+
exports.isIpV6Supported = isIpV6Supported;
|
package/dist/logger.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export declare const Log: {
|
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const getLogLevel: () => "
|
|
22
|
+
export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
23
23
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
24
24
|
export {};
|
package/dist/open-browser.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { Browser } from './browser';
|
|
|
2
2
|
import type { HeadlessBrowser } from './browser/Browser';
|
|
3
3
|
import type { Viewport } from './browser/PuppeteerViewport';
|
|
4
4
|
import { type LogLevel } from './log-level';
|
|
5
|
-
|
|
6
|
-
type OpenGlRenderer = (typeof
|
|
5
|
+
import type { validOpenGlRenderers } from './options/gl';
|
|
6
|
+
type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
7
7
|
export type ChromiumOptions = {
|
|
8
8
|
ignoreCertificateErrors?: boolean;
|
|
9
9
|
disableWebSecurity?: boolean;
|
package/dist/open-browser.js
CHANGED
|
@@ -5,20 +5,16 @@ const node_1 = require("./browser/node");
|
|
|
5
5
|
const get_local_browser_executable_1 = require("./get-local-browser-executable");
|
|
6
6
|
const get_video_threads_flag_1 = require("./get-video-threads-flag");
|
|
7
7
|
const log_level_1 = require("./log-level");
|
|
8
|
-
const
|
|
9
|
-
const validRenderers = [
|
|
10
|
-
'swangle',
|
|
11
|
-
'angle',
|
|
12
|
-
'egl',
|
|
13
|
-
'swiftshader',
|
|
14
|
-
'vulkan',
|
|
15
|
-
];
|
|
8
|
+
const gl_1 = require("./options/gl");
|
|
16
9
|
const getOpenGlRenderer = (option) => {
|
|
17
|
-
const renderer = option !== null && option !== void 0 ? option :
|
|
18
|
-
(0,
|
|
10
|
+
const renderer = option !== null && option !== void 0 ? option : gl_1.DEFAULT_OPENGL_RENDERER;
|
|
11
|
+
(0, gl_1.validateOpenGlRenderer)(renderer);
|
|
19
12
|
if (renderer === 'swangle') {
|
|
20
13
|
return [`--use-gl=angle`, `--use-angle=swiftshader`];
|
|
21
14
|
}
|
|
15
|
+
if (renderer === 'angle-egl') {
|
|
16
|
+
return [`--use-gl=angle`, `--use-angle=egl`];
|
|
17
|
+
}
|
|
22
18
|
if (renderer === 'vulkan') {
|
|
23
19
|
return [
|
|
24
20
|
'--use-angle=vulkan',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
3
|
+
export declare const glOption: {
|
|
4
|
+
cliFlag: string;
|
|
5
|
+
docLink: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
8
|
+
ssrName: string;
|
|
9
|
+
description: () => JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
12
|
+
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
13
|
+
export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOpenGlRenderer = exports.DEFAULT_OPENGL_RENDERER = exports.glOption = exports.validOpenGlRenderers = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.validOpenGlRenderers = [
|
|
6
|
+
'swangle',
|
|
7
|
+
'angle',
|
|
8
|
+
'egl',
|
|
9
|
+
'swiftshader',
|
|
10
|
+
'vulkan',
|
|
11
|
+
'angle-egl',
|
|
12
|
+
];
|
|
13
|
+
const AngleChangelog = () => {
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("details", { style: { fontSize: '0.9em', marginBottom: '1em' }, children: [(0, jsx_runtime_1.jsx)("summary", { children: "Changelog" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: ["From Remotion v2.6.7 until v3.0.7, the default for Remotion Lambda was", ' ', (0, jsx_runtime_1.jsx)("code", { children: "swiftshader" }), ", but from v3.0.8 the default is", ' ', (0, jsx_runtime_1.jsx)("code", { children: "swangle" }), " (Swiftshader on Angle) since Chrome 101 added support for it."] }), (0, jsx_runtime_1.jsxs)("li", { children: ["From Remotion v2.4.3 until v2.6.6, the default was ", (0, jsx_runtime_1.jsx)("code", { children: "angle" }), ", however it turns out to have a small memory leak that could crash long Remotion renders."] })] })] }));
|
|
15
|
+
};
|
|
16
|
+
exports.glOption = {
|
|
17
|
+
cliFlag: 'gl',
|
|
18
|
+
docLink: 'https://www.remotion.dev/docs/chromium-flags#--gl',
|
|
19
|
+
name: 'OpenGL renderer',
|
|
20
|
+
type: 'angle',
|
|
21
|
+
ssrName: 'gl',
|
|
22
|
+
description: () => {
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AngleChangelog, {}), (0, jsx_runtime_1.jsxs)("p", { children: ["Select the OpenGL renderer backend for Chromium. ", (0, jsx_runtime_1.jsx)("br", {}), "Accepted values:"] }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("code", { children: '"angle"' }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("code", { children: '"egl"' }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("code", { children: '"swiftshader"' }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("code", { children: '"swangle"' }) }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: '"vulkan"' }), " (", (0, jsx_runtime_1.jsx)("em", { children: "from Remotion v4.0.41" }), ")"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: '"angle-egl"' }), " (", (0, jsx_runtime_1.jsx)("em", { children: "from Remotion v4.0.51" }), ")"] })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["The default is ", (0, jsx_runtime_1.jsx)("code", { children: "null" }), ", letting Chrome decide, except on Lambda where the default is ", (0, jsx_runtime_1.jsx)("code", { children: '"swangle"' })] })] }));
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
exports.DEFAULT_OPENGL_RENDERER = null;
|
|
27
|
+
const validateOpenGlRenderer = (option) => {
|
|
28
|
+
if (option === null) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
if (!exports.validOpenGlRenderers.includes(option)) {
|
|
32
|
+
throw new TypeError(`${option} is not a valid GL backend. Accepted values: ${exports.validOpenGlRenderers.join(', ')}`);
|
|
33
|
+
}
|
|
34
|
+
return option;
|
|
35
|
+
};
|
|
36
|
+
exports.validateOpenGlRenderer = validateOpenGlRenderer;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const allOptions: {
|
|
3
|
+
scaleOption: {
|
|
4
|
+
name: string;
|
|
5
|
+
cliFlag: string;
|
|
6
|
+
description: () => JSX.Element;
|
|
7
|
+
ssrName: string;
|
|
8
|
+
docLink: string;
|
|
9
|
+
type: number;
|
|
10
|
+
};
|
|
11
|
+
crfOption: {
|
|
12
|
+
name: string;
|
|
13
|
+
cliFlag: string;
|
|
14
|
+
description: () => JSX.Element;
|
|
15
|
+
ssrName: string;
|
|
16
|
+
docLink: string;
|
|
17
|
+
type: number;
|
|
18
|
+
};
|
|
19
|
+
jpegQualityOption: {
|
|
20
|
+
name: string;
|
|
21
|
+
cliFlag: string;
|
|
22
|
+
description: () => JSX.Element;
|
|
23
|
+
ssrName: string;
|
|
24
|
+
docLink: string;
|
|
25
|
+
type: number;
|
|
26
|
+
};
|
|
27
|
+
videoBitrate: {
|
|
28
|
+
name: string;
|
|
29
|
+
cliFlag: string;
|
|
30
|
+
description: () => JSX.Element;
|
|
31
|
+
ssrName: string;
|
|
32
|
+
docLink: string;
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
audioBitrateOption: {
|
|
36
|
+
name: string;
|
|
37
|
+
cliFlag: string;
|
|
38
|
+
description: () => JSX.Element;
|
|
39
|
+
ssrName: string;
|
|
40
|
+
docLink: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
enforceAudioOption: {
|
|
44
|
+
name: string;
|
|
45
|
+
cliFlag: string;
|
|
46
|
+
description: () => JSX.Element;
|
|
47
|
+
ssrName: string;
|
|
48
|
+
docLink: string;
|
|
49
|
+
type: boolean;
|
|
50
|
+
};
|
|
51
|
+
muteOption: {
|
|
52
|
+
name: string;
|
|
53
|
+
cliFlag: string;
|
|
54
|
+
description: () => JSX.Element;
|
|
55
|
+
ssrName: string;
|
|
56
|
+
docLink: string;
|
|
57
|
+
type: boolean;
|
|
58
|
+
};
|
|
59
|
+
videoCodecOption: {
|
|
60
|
+
name: string;
|
|
61
|
+
cliFlag: string;
|
|
62
|
+
description: () => JSX.Element;
|
|
63
|
+
ssrName: string;
|
|
64
|
+
docLink: string;
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
offthreadVideoCacheSizeInBytesOption: {
|
|
68
|
+
name: string;
|
|
69
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
70
|
+
description: () => JSX.Element;
|
|
71
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
72
|
+
docLink: string;
|
|
73
|
+
type: number | null;
|
|
74
|
+
};
|
|
75
|
+
webhookCustomDataOption: {
|
|
76
|
+
name: string;
|
|
77
|
+
cliFlag: "webhook-custom-data";
|
|
78
|
+
description: (type: "ssr" | "cli") => JSX.Element;
|
|
79
|
+
ssrName: "customData";
|
|
80
|
+
docLink: string;
|
|
81
|
+
type: Record<string, unknown> | null;
|
|
82
|
+
};
|
|
83
|
+
colorSpaceOption: {
|
|
84
|
+
name: string;
|
|
85
|
+
cliFlag: "color-space";
|
|
86
|
+
description: () => JSX.Element;
|
|
87
|
+
docLink: string;
|
|
88
|
+
ssrName: string;
|
|
89
|
+
type: "default" | "bt709";
|
|
90
|
+
};
|
|
91
|
+
deleteAfterOption: {
|
|
92
|
+
name: string;
|
|
93
|
+
cliFlag: "delete-after";
|
|
94
|
+
description: () => JSX.Element;
|
|
95
|
+
ssrName: "deleteAfter";
|
|
96
|
+
docLink: string;
|
|
97
|
+
type: string | null;
|
|
98
|
+
};
|
|
99
|
+
folderExpiryOption: {
|
|
100
|
+
name: string;
|
|
101
|
+
cliFlag: "enable-folder-expiry";
|
|
102
|
+
description: () => JSX.Element;
|
|
103
|
+
ssrName: "enableFolderExpiry";
|
|
104
|
+
docLink: string;
|
|
105
|
+
type: boolean | null;
|
|
106
|
+
};
|
|
107
|
+
enableMultiprocessOnLinuxOption: {
|
|
108
|
+
name: string;
|
|
109
|
+
cliFlag: "enable-multiprocess-on-linux";
|
|
110
|
+
description: () => JSX.Element;
|
|
111
|
+
ssrName: string;
|
|
112
|
+
docLink: string;
|
|
113
|
+
type: boolean;
|
|
114
|
+
};
|
|
115
|
+
glOption: {
|
|
116
|
+
cliFlag: string;
|
|
117
|
+
docLink: string;
|
|
118
|
+
name: string;
|
|
119
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
120
|
+
ssrName: string;
|
|
121
|
+
description: () => JSX.Element;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allOptions = void 0;
|
|
4
|
+
const audio_bitrate_1 = require("./audio-bitrate");
|
|
5
|
+
const color_space_1 = require("./color-space");
|
|
6
|
+
const crf_1 = require("./crf");
|
|
7
|
+
const delete_after_1 = require("./delete-after");
|
|
8
|
+
const enable_multiprocess_on_linux_1 = require("./enable-multiprocess-on-linux");
|
|
9
|
+
const enforce_audio_1 = require("./enforce-audio");
|
|
10
|
+
const folder_expiry_1 = require("./folder-expiry");
|
|
11
|
+
const gl_1 = require("./gl");
|
|
12
|
+
const jpeg_quality_1 = require("./jpeg-quality");
|
|
13
|
+
const mute_1 = require("./mute");
|
|
14
|
+
const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
|
|
15
|
+
const scale_1 = require("./scale");
|
|
16
|
+
const video_bitrate_1 = require("./video-bitrate");
|
|
17
|
+
const video_codec_1 = require("./video-codec");
|
|
18
|
+
const webhook_custom_data_1 = require("./webhook-custom-data");
|
|
19
|
+
exports.allOptions = {
|
|
20
|
+
scaleOption: scale_1.scaleOption,
|
|
21
|
+
crfOption: crf_1.crfOption,
|
|
22
|
+
jpegQualityOption: jpeg_quality_1.jpegQualityOption,
|
|
23
|
+
videoBitrate: video_bitrate_1.videoBitrate,
|
|
24
|
+
audioBitrateOption: audio_bitrate_1.audioBitrateOption,
|
|
25
|
+
enforceAudioOption: enforce_audio_1.enforceAudioOption,
|
|
26
|
+
muteOption: mute_1.muteOption,
|
|
27
|
+
videoCodecOption: video_codec_1.videoCodecOption,
|
|
28
|
+
offthreadVideoCacheSizeInBytesOption: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
29
|
+
webhookCustomDataOption: webhook_custom_data_1.webhookCustomDataOption,
|
|
30
|
+
colorSpaceOption: color_space_1.colorSpaceOption,
|
|
31
|
+
deleteAfterOption: delete_after_1.deleteAfterOption,
|
|
32
|
+
folderExpiryOption: folder_expiry_1.folderExpiryOption,
|
|
33
|
+
enableMultiprocessOnLinuxOption: enable_multiprocess_on_linux_1.enableMultiprocessOnLinuxOption,
|
|
34
|
+
glOption: gl_1.glOption,
|
|
35
|
+
};
|
package/dist/serve-static.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.serveStatic = void 0;
|
|
7
7
|
const node_http_1 = __importDefault(require("node:http"));
|
|
8
8
|
const get_port_1 = require("./get-port");
|
|
9
|
+
const is_ipv6_supported_1 = require("./is-ipv6-supported");
|
|
9
10
|
const offthread_video_server_1 = require("./offthread-video-server");
|
|
10
11
|
const serve_handler_1 = require("./serve-handler");
|
|
11
12
|
const serveStatic = async (path, options) => {
|
|
@@ -45,8 +46,10 @@ const serveStatic = async (path, options) => {
|
|
|
45
46
|
});
|
|
46
47
|
let selectedPort = null;
|
|
47
48
|
const maxTries = 5;
|
|
48
|
-
|
|
49
|
-
const
|
|
49
|
+
const host = (0, is_ipv6_supported_1.isIpV6Supported)() ? '::' : '0.0.0.0';
|
|
50
|
+
const hostsToTry = (0, is_ipv6_supported_1.isIpV6Supported)()
|
|
51
|
+
? ['::', '::1']
|
|
52
|
+
: ['0.0.0.0', '127.0.0.1'];
|
|
50
53
|
for (let i = 0; i < maxTries; i++) {
|
|
51
54
|
try {
|
|
52
55
|
selectedPort = await new Promise((resolve, reject) => {
|
|
@@ -55,7 +58,7 @@ const serveStatic = async (path, options) => {
|
|
|
55
58
|
desiredPort: (_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : undefined,
|
|
56
59
|
from: 3000,
|
|
57
60
|
to: 3100,
|
|
58
|
-
hostsToTry
|
|
61
|
+
hostsToTry,
|
|
59
62
|
})
|
|
60
63
|
.then(({ port, didUsePort }) => {
|
|
61
64
|
server.listen({ port, host });
|
|
@@ -75,10 +78,14 @@ const serveStatic = async (path, options) => {
|
|
|
75
78
|
};
|
|
76
79
|
const close = async () => {
|
|
77
80
|
await Promise.all([
|
|
78
|
-
new Promise((resolve) => {
|
|
81
|
+
new Promise((resolve, reject) => {
|
|
79
82
|
// compositor may have already quit before,
|
|
80
83
|
// this is okay as we are in cleanup phase
|
|
81
|
-
closeCompositor()
|
|
84
|
+
closeCompositor()
|
|
85
|
+
.catch((err) => {
|
|
86
|
+
reject(err);
|
|
87
|
+
})
|
|
88
|
+
.finally(() => {
|
|
82
89
|
resolve();
|
|
83
90
|
});
|
|
84
91
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodec: AudioCodec | null;
|
|
5
5
|
extension: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.51",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.51"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
44
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-linux-x64-
|
|
48
|
-
"@remotion/compositor-linux-
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.51",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.51",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.51",
|
|
46
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.51",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.51",
|
|
48
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.51",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.51"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan"];
|
|
2
|
-
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
|
-
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
-
export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateOpenGlRenderer = exports.DEFAULT_OPENGL_RENDERER = exports.validOpenGlRenderers = void 0;
|
|
4
|
-
exports.validOpenGlRenderers = [
|
|
5
|
-
'swangle',
|
|
6
|
-
'angle',
|
|
7
|
-
'egl',
|
|
8
|
-
'swiftshader',
|
|
9
|
-
'vulkan',
|
|
10
|
-
];
|
|
11
|
-
exports.DEFAULT_OPENGL_RENDERER = null;
|
|
12
|
-
const validateOpenGlRenderer = (option) => {
|
|
13
|
-
if (option === null) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
if (!exports.validOpenGlRenderers.includes(option)) {
|
|
17
|
-
throw new TypeError(`${option} is not a valid GL backend. Accepted values: ${exports.validOpenGlRenderers.join(', ')}`);
|
|
18
|
-
}
|
|
19
|
-
return option;
|
|
20
|
-
};
|
|
21
|
-
exports.validateOpenGlRenderer = validateOpenGlRenderer;
|