remotion 4.0.0-oops.3 → 4.0.0-prefetch.7

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.
Files changed (189) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/README.md +30 -19
  3. package/dist/AbsoluteFill.d.ts +6 -2
  4. package/dist/AbsoluteFill.js +7 -3
  5. package/dist/CanUseRemotionHooks.d.ts +5 -0
  6. package/dist/CanUseRemotionHooks.js +10 -0
  7. package/dist/Composition.d.ts +3 -6
  8. package/dist/Composition.js +40 -28
  9. package/dist/CompositionManager.d.ts +7 -12
  10. package/dist/CompositionManager.js +15 -5
  11. package/dist/Folder.d.ts +15 -0
  12. package/dist/Folder.js +33 -0
  13. package/dist/IFrame.js +1 -1
  14. package/dist/Img.js +33 -16
  15. package/dist/RemotionRoot.js +1 -1
  16. package/dist/{sequencing/index.d.ts → Sequence.d.ts} +13 -3
  17. package/dist/{sequencing/index.js → Sequence.js} +40 -34
  18. package/dist/Still.d.ts +1 -1
  19. package/dist/Still.js +1 -1
  20. package/dist/asset-types.d.ts +1 -4
  21. package/dist/audio/Audio.d.ts +2 -2
  22. package/dist/audio/Audio.js +5 -5
  23. package/dist/audio/AudioForDevelopment.d.ts +3 -2
  24. package/dist/audio/AudioForDevelopment.js +19 -6
  25. package/dist/audio/AudioForRendering.d.ts +5 -2
  26. package/dist/audio/AudioForRendering.js +15 -8
  27. package/dist/audio/index.js +5 -1
  28. package/dist/audio/props.d.ts +1 -1
  29. package/dist/audio/shared-audio-tags.d.ts +4 -3
  30. package/dist/audio/shared-audio-tags.js +115 -42
  31. package/dist/audio/use-audio-frame.js +4 -4
  32. package/dist/config/bundle-out-dir.d.ts +2 -0
  33. package/dist/config/bundle-out-dir.js +12 -0
  34. package/dist/config/input-props.js +12 -14
  35. package/dist/config/public-path.d.ts +2 -0
  36. package/dist/config/public-path.js +12 -0
  37. package/dist/{config/index.d.ts → config.d.ts} +70 -22
  38. package/dist/config.js +21 -0
  39. package/dist/default-css.d.ts +1 -0
  40. package/dist/default-css.js +9 -2
  41. package/dist/delay-render.d.ts +1 -1
  42. package/dist/delay-render.js +4 -4
  43. package/dist/freeze.d.ts +2 -2
  44. package/dist/freeze.js +2 -2
  45. package/dist/get-timeline-clip-name.js +2 -1
  46. package/dist/index.d.ts +23 -8
  47. package/dist/index.js +18 -8
  48. package/dist/internals.d.ts +35 -101
  49. package/dist/internals.js +18 -94
  50. package/dist/{interpolateColors.d.ts → interpolate-colors.d.ts} +0 -0
  51. package/dist/{interpolateColors.js → interpolate-colors.js} +0 -0
  52. package/dist/loading-indicator.d.ts +2 -0
  53. package/dist/loading-indicator.js +35 -0
  54. package/dist/loop/index.js +5 -4
  55. package/dist/multiple-versions-warning.js +18 -4
  56. package/dist/play-and-handle-not-allowed-error.d.ts +1 -1
  57. package/dist/portal-node.d.ts +1 -0
  58. package/dist/portal-node.js +23 -0
  59. package/dist/preload.d.ts +7 -0
  60. package/dist/preload.js +83 -0
  61. package/dist/register-root.d.ts +2 -1
  62. package/dist/register-root.js +20 -5
  63. package/dist/series/index.d.ts +2 -2
  64. package/dist/series/index.js +4 -4
  65. package/dist/spring/index.d.ts +8 -4
  66. package/dist/spring/index.js +21 -6
  67. package/dist/spring/measure-spring.d.ts +1 -1
  68. package/dist/spring/measure-spring.js +1 -1
  69. package/dist/static-file.js +6 -0
  70. package/dist/timeline-position-state.d.ts +1 -1
  71. package/dist/{use-frame.d.ts → use-current-frame.d.ts} +0 -1
  72. package/dist/use-current-frame.js +28 -0
  73. package/dist/use-lazy-component.d.ts +3 -3
  74. package/dist/use-lazy-component.js +5 -1
  75. package/dist/use-media-in-timeline.d.ts +2 -2
  76. package/dist/use-media-in-timeline.js +10 -7
  77. package/dist/use-media-playback.d.ts +3 -2
  78. package/dist/use-media-playback.js +9 -6
  79. package/dist/use-media-tag-volume.d.ts +1 -1
  80. package/dist/use-sync-volume-with-media-tag.d.ts +2 -2
  81. package/dist/use-unsafe-video-config.d.ts +1 -1
  82. package/dist/use-unsafe-video-config.js +2 -2
  83. package/dist/use-video-config.d.ts +1 -1
  84. package/dist/use-video-config.js +6 -0
  85. package/dist/use-video.d.ts +13 -1
  86. package/dist/use-video.js +16 -3
  87. package/dist/validate-media-props.d.ts +4 -3
  88. package/dist/validation/validate-fps.d.ts +1 -1
  89. package/dist/validation/validate-fps.js +4 -1
  90. package/dist/validation/validate-offthreadvideo-image-format.d.ts +1 -0
  91. package/dist/validation/validate-offthreadvideo-image-format.js +15 -0
  92. package/dist/validation/validation-spring-duration.d.ts +1 -0
  93. package/dist/validation/validation-spring-duration.js +21 -0
  94. package/dist/version.d.ts +1 -0
  95. package/dist/version.js +5 -0
  96. package/dist/video/OffthreadVideo.d.ts +3 -0
  97. package/dist/video/OffthreadVideo.js +27 -0
  98. package/dist/video/OffthreadVideoForRendering.d.ts +3 -0
  99. package/dist/video/OffthreadVideoForRendering.js +101 -0
  100. package/dist/video/Video.d.ts +3 -3
  101. package/dist/video/Video.js +4 -4
  102. package/dist/video/VideoForDevelopment.d.ts +7 -2
  103. package/dist/video/VideoForDevelopment.js +28 -4
  104. package/dist/video/VideoForRendering.d.ts +5 -2
  105. package/dist/video/VideoForRendering.js +62 -40
  106. package/dist/video/get-current-time.d.ts +7 -1
  107. package/dist/video/get-current-time.js +17 -9
  108. package/dist/video/index.d.ts +3 -2
  109. package/dist/video/index.js +5 -12
  110. package/dist/video/props.d.ts +13 -2
  111. package/dist/volume-prop.js +1 -1
  112. package/dist/warn-about-non-seekable-media.d.ts +1 -1
  113. package/dist/warn-about-non-seekable-media.js +14 -2
  114. package/dist/wrap-remotion-context.d.ts +2 -1
  115. package/dist/wrap-remotion-context.js +12 -4
  116. package/ensure-correct-version.js +24 -0
  117. package/package.json +10 -11
  118. package/version.d.ts +1 -0
  119. package/version.js +1 -0
  120. package/dist/compress-assets.d.ts +0 -7
  121. package/dist/compress-assets.js +0 -25
  122. package/dist/config/browser-executable.d.ts +0 -3
  123. package/dist/config/browser-executable.js +0 -12
  124. package/dist/config/browser.d.ts +0 -4
  125. package/dist/config/browser.js +0 -19
  126. package/dist/config/chromium-flags.d.ts +0 -10
  127. package/dist/config/chromium-flags.js +0 -34
  128. package/dist/config/codec.d.ts +0 -17
  129. package/dist/config/codec.js +0 -103
  130. package/dist/config/concurrency.d.ts +0 -3
  131. package/dist/config/concurrency.js +0 -15
  132. package/dist/config/crf.d.ts +0 -9
  133. package/dist/config/crf.js +0 -83
  134. package/dist/config/env-file.d.ts +0 -2
  135. package/dist/config/env-file.js +0 -10
  136. package/dist/config/ffmpeg-executable.d.ts +0 -3
  137. package/dist/config/ffmpeg-executable.js +0 -12
  138. package/dist/config/frame-range.d.ts +0 -5
  139. package/dist/config/frame-range.js +0 -80
  140. package/dist/config/image-format.d.ts +0 -8
  141. package/dist/config/image-format.js +0 -37
  142. package/dist/config/image-sequence.d.ts +0 -3
  143. package/dist/config/image-sequence.js +0 -15
  144. package/dist/config/index.js +0 -175
  145. package/dist/config/log.d.ts +0 -7
  146. package/dist/config/log.js +0 -25
  147. package/dist/config/max-timeline-tracks.d.ts +0 -2
  148. package/dist/config/max-timeline-tracks.js +0 -24
  149. package/dist/config/override-webpack.d.ts +0 -12
  150. package/dist/config/override-webpack.js +0 -14
  151. package/dist/config/overwrite.d.ts +0 -3
  152. package/dist/config/overwrite.js +0 -14
  153. package/dist/config/pixel-format.d.ts +0 -8
  154. package/dist/config/pixel-format.js +0 -38
  155. package/dist/config/preview-server.d.ts +0 -2
  156. package/dist/config/preview-server.js +0 -20
  157. package/dist/config/prores-profile.d.ts +0 -7
  158. package/dist/config/prores-profile.js +0 -32
  159. package/dist/config/quality.d.ts +0 -2
  160. package/dist/config/quality.js +0 -17
  161. package/dist/config/scale.d.ts +0 -3
  162. package/dist/config/scale.js +0 -15
  163. package/dist/config/still-frame.d.ts +0 -2
  164. package/dist/config/still-frame.js +0 -12
  165. package/dist/config/timeout.d.ts +0 -2
  166. package/dist/config/timeout.js +0 -17
  167. package/dist/config/webpack-caching.d.ts +0 -3
  168. package/dist/config/webpack-caching.js +0 -16
  169. package/dist/feature-flags.d.ts +0 -1
  170. package/dist/feature-flags.js +0 -7
  171. package/dist/initial-frame.d.ts +0 -2
  172. package/dist/initial-frame.js +0 -12
  173. package/dist/is-audio-codec.d.ts +0 -2
  174. package/dist/is-audio-codec.js +0 -7
  175. package/dist/perf/index.d.ts +0 -5
  176. package/dist/perf/index.js +0 -33
  177. package/dist/timeline-inout-position-state.d.ts +0 -12
  178. package/dist/timeline-inout-position-state.js +0 -23
  179. package/dist/timeout.d.ts +0 -2
  180. package/dist/timeout.js +0 -12
  181. package/dist/use-frame.js +0 -25
  182. package/dist/validation/validate-frame.d.ts +0 -1
  183. package/dist/validation/validate-frame.js +0 -24
  184. package/dist/validation/validate-image-format.d.ts +0 -2
  185. package/dist/validation/validate-image-format.js +0 -9
  186. package/dist/validation/validate-opengl-renderer.d.ts +0 -4
  187. package/dist/validation/validate-opengl-renderer.js +0 -14
  188. package/dist/validation/validate-quality.d.ts +0 -1
  189. package/dist/validation/validate-quality.js +0 -21
@@ -1,5 +0,0 @@
1
- export declare type FrameRange = number | [number, number];
2
- export declare const validateFrameRange: (frameRange: FrameRange | null) => void;
3
- export declare const setFrameRange: (newFrameRange: FrameRange | null) => void;
4
- export declare const setFrameRangeFromCli: (newFrameRange: string | number) => void;
5
- export declare const getRange: () => FrameRange | null;
@@ -1,80 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRange = exports.setFrameRangeFromCli = exports.setFrameRange = exports.validateFrameRange = void 0;
4
- let range = null;
5
- const validateFrameRange = (frameRange) => {
6
- if (frameRange === null) {
7
- return;
8
- }
9
- if (typeof frameRange === 'number') {
10
- if (frameRange < 0) {
11
- throw new TypeError('Frame must be a non-negative number, got ' + frameRange);
12
- }
13
- if (!Number.isFinite(frameRange)) {
14
- throw new TypeError('Frame must be a finite number, got ' + frameRange);
15
- }
16
- if (!Number.isInteger(frameRange)) {
17
- throw new Error(`Frame must be an integer, but got a float (${frameRange})`);
18
- }
19
- return;
20
- }
21
- if (Array.isArray(frameRange)) {
22
- if (frameRange.length !== 2) {
23
- throw new TypeError('Frame range must be a tuple, got an array with length ' +
24
- frameRange.length);
25
- }
26
- for (const value of frameRange) {
27
- if (typeof value !== 'number') {
28
- throw new Error(`Each value of frame range must be a number, but got ${typeof value} (${JSON.stringify(value)})`);
29
- }
30
- if (!Number.isFinite(value)) {
31
- throw new TypeError('Each value of frame range must be finite, but got ' + value);
32
- }
33
- if (!Number.isInteger(value)) {
34
- throw new Error(`Each value of frame range must be an integer, but got a float (${value})`);
35
- }
36
- if (value < 0) {
37
- throw new Error(`Each value of frame range must be non-negative, but got ${value}`);
38
- }
39
- }
40
- const [first, second] = frameRange;
41
- if (second < first) {
42
- throw new Error('The second value of frame range must be not smaller than the first one, but got ' +
43
- frameRange.join('-'));
44
- }
45
- return;
46
- }
47
- throw new TypeError('Frame range must be a number or a tuple of numbers, but got object of type ' +
48
- typeof frameRange);
49
- };
50
- exports.validateFrameRange = validateFrameRange;
51
- const setFrameRange = (newFrameRange) => {
52
- (0, exports.validateFrameRange)(newFrameRange);
53
- range = newFrameRange;
54
- };
55
- exports.setFrameRange = setFrameRange;
56
- const setFrameRangeFromCli = (newFrameRange) => {
57
- if (typeof newFrameRange === 'number') {
58
- (0, exports.setFrameRange)(newFrameRange);
59
- range = newFrameRange;
60
- return;
61
- }
62
- if (typeof newFrameRange === 'string') {
63
- const parsed = newFrameRange.split('-').map((f) => Number(f));
64
- if (parsed.length > 2 || parsed.length <= 0) {
65
- throw new Error(`--frames flag must be a number or 2 numbers separated by '-', instead got ${parsed.length} numbers`);
66
- }
67
- if (parsed.length === 2 && parsed[1] < parsed[0]) {
68
- throw new Error('The second number of the --frames flag number should be greater or equal than first number');
69
- }
70
- for (const value of parsed) {
71
- if (isNaN(value)) {
72
- throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
73
- }
74
- }
75
- (0, exports.setFrameRange)(parsed);
76
- }
77
- };
78
- exports.setFrameRangeFromCli = setFrameRangeFromCli;
79
- const getRange = () => range;
80
- exports.getRange = getRange;
@@ -1,8 +0,0 @@
1
- import { PixelFormat } from './pixel-format';
2
- declare const validOptions: readonly ["png", "jpeg", "none"];
3
- export declare type ImageFormat = typeof validOptions[number];
4
- export declare type StillImageFormat = 'png' | 'jpeg';
5
- export declare const setImageFormat: (format: ImageFormat) => void;
6
- export declare const getUserPreferredImageFormat: () => "none" | "png" | "jpeg" | undefined;
7
- export declare const validateSelectedPixelFormatAndImageFormatCombination: (pixelFormat: PixelFormat, imageFormat: ImageFormat) => 'none' | 'valid';
8
- export {};
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getUserPreferredImageFormat = exports.setImageFormat = void 0;
4
- const validOptions = ['png', 'jpeg', 'none'];
5
- let currentImageFormat;
6
- const setImageFormat = (format) => {
7
- if (typeof format === 'undefined') {
8
- currentImageFormat = undefined;
9
- return;
10
- }
11
- if (!validOptions.includes(format)) {
12
- throw new TypeError(`Value ${format} is not valid as an image format.`);
13
- }
14
- currentImageFormat = format;
15
- };
16
- exports.setImageFormat = setImageFormat;
17
- const getUserPreferredImageFormat = () => {
18
- return currentImageFormat;
19
- };
20
- exports.getUserPreferredImageFormat = getUserPreferredImageFormat;
21
- // By returning a value, we improve testability as we can specifically test certain branches
22
- const validateSelectedPixelFormatAndImageFormatCombination = (pixelFormat, imageFormat) => {
23
- if (imageFormat === 'none') {
24
- return 'none';
25
- }
26
- if (!validOptions.includes(imageFormat)) {
27
- throw new TypeError(`Value ${imageFormat} is not valid as an image format.`);
28
- }
29
- if (pixelFormat !== 'yuva420p' && pixelFormat !== 'yuva444p10le') {
30
- return 'valid';
31
- }
32
- if (imageFormat !== 'png') {
33
- throw new TypeError(`Pixel format was set to '${pixelFormat}' but the image format is not PNG. To render transparent videos, you need to set PNG as the image format.`);
34
- }
35
- return 'valid';
36
- };
37
- exports.validateSelectedPixelFormatAndImageFormatCombination = validateSelectedPixelFormatAndImageFormatCombination;
@@ -1,3 +0,0 @@
1
- import { FrameRange } from './frame-range';
2
- export declare const setImageSequence: (newImageSequence: boolean) => void;
3
- export declare const getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getShouldOutputImageSequence = exports.setImageSequence = void 0;
4
- let imageSequence = false;
5
- const setImageSequence = (newImageSequence) => {
6
- if (typeof newImageSequence !== 'boolean') {
7
- throw new TypeError('setImageSequence accepts a Boolean Value');
8
- }
9
- imageSequence = newImageSequence;
10
- };
11
- exports.setImageSequence = setImageSequence;
12
- const getShouldOutputImageSequence = (frameRange) => {
13
- return imageSequence || typeof frameRange === 'number';
14
- };
15
- exports.getShouldOutputImageSequence = getShouldOutputImageSequence;
@@ -1,175 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Config = void 0;
4
- const browser_executable_1 = require("./browser-executable");
5
- const chromium_flags_1 = require("./chromium-flags");
6
- const codec_1 = require("./codec");
7
- const concurrency_1 = require("./concurrency");
8
- const crf_1 = require("./crf");
9
- const env_file_1 = require("./env-file");
10
- const ffmpeg_executable_1 = require("./ffmpeg-executable");
11
- const frame_range_1 = require("./frame-range");
12
- const image_format_1 = require("./image-format");
13
- const image_sequence_1 = require("./image-sequence");
14
- const log_1 = require("./log");
15
- const max_timeline_tracks_1 = require("./max-timeline-tracks");
16
- const override_webpack_1 = require("./override-webpack");
17
- const overwrite_1 = require("./overwrite");
18
- const pixel_format_1 = require("./pixel-format");
19
- const preview_server_1 = require("./preview-server");
20
- const prores_profile_1 = require("./prores-profile");
21
- const quality_1 = require("./quality");
22
- const scale_1 = require("./scale");
23
- const timeout_1 = require("./timeout");
24
- const webpack_caching_1 = require("./webpack-caching");
25
- exports.Config = {
26
- Preview: {
27
- /**
28
- * Change the maximum amount of tracks that are shown in the timeline.
29
- * @param maxTracks The maximum amount of timeline tracks that you would like to show.
30
- * @default 15
31
- */
32
- setMaxTimelineTracks: max_timeline_tracks_1.setMaxTimelineTracks,
33
- },
34
- Bundling: {
35
- /**
36
- * Pass in a function which takes the current Webpack config
37
- * and return a modified Webpack configuration.
38
- * Docs: http://remotion.dev/docs/webpack
39
- */
40
- overrideWebpackConfig: override_webpack_1.overrideWebpackConfig,
41
- /**
42
- * Whether Webpack bundles should be cached to make
43
- * subsequent renders faster. Default: true
44
- */
45
- setCachingEnabled: webpack_caching_1.setWebpackCaching,
46
- /**
47
- * Define on which port Remotion should start it's HTTP servers during preview and rendering.
48
- * By default, Remotion will try to find a free port.
49
- * If you specify a port, but it's not available, Remotion will throw an error.
50
- */
51
- setPort: preview_server_1.setPort,
52
- },
53
- Log: {
54
- /**
55
- * Set the log level.
56
- * Acceptable values: 'error' | 'warning' | 'info' | 'verbose'
57
- * Default value: 'info'
58
- *
59
- * Set this to 'verbose' to get browser logs and other IO.
60
- */
61
- setLevel: log_1.setLogLevel,
62
- },
63
- Puppeteer: {
64
- /**
65
- * Specify executable path for the browser to use.
66
- * Default: null, which will make Remotion find or download a version of said browser.
67
- */
68
- setBrowserExecutable: browser_executable_1.setBrowserExecutable,
69
- /**
70
- * Set how many milliseconds a frame may take to render before it times out.
71
- * Default: `30000`
72
- */
73
- setTimeoutInMilliseconds: timeout_1.setPuppeteerTimeout,
74
- /**
75
- * Setting deciding whether to disable CORS and other Chrome security features.
76
- * Default: false
77
- */
78
- setChromiumDisableWebSecurity: chromium_flags_1.setChromiumDisableWebSecurity,
79
- /**
80
- * Setting whether to ignore any invalid SSL certificates, such as self-signed ones.
81
- * Default: false
82
- */
83
- setChromiumIgnoreCertificateErrors: chromium_flags_1.setChromiumIgnoreCertificateErrors,
84
- /**
85
- * If false, will open an actual browser during rendering to observe progress.
86
- * Default: true
87
- */
88
- setChromiumHeadlessMode: chromium_flags_1.setChromiumHeadlessMode,
89
- /**
90
- * Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle' and 'swiftshader'.
91
- * Default: 'swiftshader' in Lambda, 'angle' elsewhere.
92
- */
93
- setChromiumOpenGlRenderer: chromium_flags_1.setChromiumOpenGlRenderer,
94
- },
95
- Rendering: {
96
- /**
97
- * Set a custom location for a .env file.
98
- * Default: `.env`
99
- */
100
- setDotEnvLocation: env_file_1.setDotEnvLocation,
101
- /**
102
- * Sets how many Puppeteer instances will work on rendering your video in parallel.
103
- * Default: `null`, meaning half of the threads available on your CPU.
104
- */
105
- setConcurrency: concurrency_1.setConcurrency,
106
- /**
107
- * Set the JPEG quality for the frames.
108
- * Must be between 0 and 100.
109
- * Must be between 0 and 100.
110
- * Default: 80
111
- */
112
- setQuality: quality_1.setQuality,
113
- /** Decide in which image format to render. Can be either 'jpeg' or 'png'.
114
- * PNG is slower, but supports transparency.
115
- */
116
- setImageFormat: image_format_1.setImageFormat,
117
- /**
118
- * Render only a subset of a video.
119
- * Pass in a tuple [20, 30] to only render frames 20-30 into a video.
120
- * Pass in a single number `20` to only render a single frame as an image.
121
- * The frame count starts at 0.
122
- */
123
- setFrameRange: frame_range_1.setFrameRange,
124
- /**
125
- * Specify local ffmpeg executable.
126
- * Default: null, which will use ffmpeg available in PATH.
127
- */
128
- setFfmpegExecutable: ffmpeg_executable_1.setFfmpegExecutable,
129
- /**
130
- * Scales the output dimensions by a factor.
131
- * Default: 1.
132
- */
133
- setScale: scale_1.setScale,
134
- },
135
- Output: {
136
- /**
137
- * If the video file already exists, should Remotion overwrite
138
- * the output? Default: true
139
- */
140
- setOverwriteOutput: overwrite_1.setOverwriteOutput,
141
- /**
142
- * Sets the pixel format in FFMPEG.
143
- * See https://trac.ffmpeg.org/wiki/Chroma%20Subsampling for an explanation.
144
- * You can override this using the `--pixel-format` Cli flag.
145
- */
146
- setPixelFormat: pixel_format_1.setPixelFormat,
147
- /**
148
- * @deprecated Use setCodec() and setImageSequence() instead.
149
- * Specify what kind of output you, either `mp4` or `png-sequence`.
150
- */
151
- setOutputFormat: codec_1.setOutputFormat,
152
- /**
153
- * Specify the codec for stitching the frames into a video.
154
- * Can be `h264` (default), `h265`, `vp8` or `vp9`
155
- */
156
- setCodec: codec_1.setCodec,
157
- /**
158
- * Set the Constant Rate Factor to pass to FFMPEG.
159
- * Lower values mean better quality, but be aware that the ranges of
160
- * possible values greatly differs between codecs.
161
- */
162
- setCrf: crf_1.setCrf,
163
- /**
164
- * Set to true if don't want a video but an image sequence as the output.
165
- */
166
- setImageSequence: image_sequence_1.setImageSequence,
167
- /**
168
- * Set the ProRes profile.
169
- * This method is only valid if the codec has been set to 'prores'.
170
- * Possible values: 4444-xq, 4444, hq, standard, light, proxy. Default: 'hq'
171
- * See https://avpres.net/FFmpeg/im_ProRes.html for meaning of possible values.
172
- */
173
- setProResProfile: prores_profile_1.setProResProfile,
174
- },
175
- };
@@ -1,7 +0,0 @@
1
- export declare const logLevels: readonly ["verbose", "info", "warn", "error"];
2
- export declare type LogLevel = typeof logLevels[number];
3
- export declare const DEFAULT_LOG_LEVEL: LogLevel;
4
- export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error";
5
- export declare const setLogLevel: (newLogLevel: LogLevel) => void;
6
- export declare const isValidLogLevel: (level: string) => boolean;
7
- export declare const isEqualOrBelowLogLevel: (currentLevel: LogLevel, level: LogLevel) => boolean;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEqualOrBelowLogLevel = exports.isValidLogLevel = exports.setLogLevel = exports.getLogLevel = exports.DEFAULT_LOG_LEVEL = exports.logLevels = void 0;
4
- exports.logLevels = ['verbose', 'info', 'warn', 'error'];
5
- exports.DEFAULT_LOG_LEVEL = 'info';
6
- let logLevel = exports.DEFAULT_LOG_LEVEL;
7
- const getLogLevel = () => {
8
- return logLevel;
9
- };
10
- exports.getLogLevel = getLogLevel;
11
- const setLogLevel = (newLogLevel) => {
12
- logLevel = newLogLevel;
13
- };
14
- exports.setLogLevel = setLogLevel;
15
- const getNumberForLogLevel = (level) => {
16
- return exports.logLevels.indexOf(level);
17
- };
18
- const isValidLogLevel = (level) => {
19
- return getNumberForLogLevel(level) > -1;
20
- };
21
- exports.isValidLogLevel = isValidLogLevel;
22
- const isEqualOrBelowLogLevel = (currentLevel, level) => {
23
- return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
24
- };
25
- exports.isEqualOrBelowLogLevel = isEqualOrBelowLogLevel;
@@ -1,2 +0,0 @@
1
- export declare const setMaxTimelineTracks: (maxTracks: number) => void;
2
- export declare const getMaxTimelineTracks: () => number;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMaxTimelineTracks = exports.setMaxTimelineTracks = void 0;
4
- let maxTimelineTracks = 15;
5
- const setMaxTimelineTracks = (maxTracks) => {
6
- if (typeof maxTracks !== 'number') {
7
- throw new Error(`Need to pass a number to Config.Preview.setMaxTimelineTracks(), got ${typeof maxTracks}`);
8
- }
9
- if (Number.isNaN(maxTracks)) {
10
- throw new Error(`Need to pass a real number to Config.Preview.setMaxTimelineTracks(), got NaN`);
11
- }
12
- if (!Number.isFinite(maxTracks)) {
13
- throw new Error(`Need to pass a real number to Config.Preview.setMaxTimelineTracks(), got ${maxTracks}`);
14
- }
15
- if (maxTracks < 0) {
16
- throw new Error(`Need to pass a non-negative number to Config.Preview.setMaxTimelineTracks(), got ${maxTracks}`);
17
- }
18
- maxTimelineTracks = maxTracks;
19
- };
20
- exports.setMaxTimelineTracks = setMaxTimelineTracks;
21
- const getMaxTimelineTracks = () => {
22
- return maxTimelineTracks;
23
- };
24
- exports.getMaxTimelineTracks = getMaxTimelineTracks;
@@ -1,12 +0,0 @@
1
- import { Configuration } from 'webpack';
2
- export declare type WebpackConfiguration = Configuration & {
3
- devServer: {
4
- contentBase: string;
5
- historyApiFallback: boolean;
6
- hot: true;
7
- };
8
- };
9
- export declare type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
10
- export declare const defaultOverrideFunction: WebpackOverrideFn;
11
- export declare const getWebpackOverrideFn: () => WebpackOverrideFn;
12
- export declare const overrideWebpackConfig: (fn: WebpackOverrideFn) => void;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.overrideWebpackConfig = exports.getWebpackOverrideFn = exports.defaultOverrideFunction = void 0;
4
- const defaultOverrideFunction = (config) => config;
5
- exports.defaultOverrideFunction = defaultOverrideFunction;
6
- let overrideFn = exports.defaultOverrideFunction;
7
- const getWebpackOverrideFn = () => {
8
- return overrideFn;
9
- };
10
- exports.getWebpackOverrideFn = getWebpackOverrideFn;
11
- const overrideWebpackConfig = (fn) => {
12
- overrideFn = fn;
13
- };
14
- exports.overrideWebpackConfig = overrideWebpackConfig;
@@ -1,3 +0,0 @@
1
- export declare const DEFAULT_OVERWRITE = true;
2
- export declare const setOverwriteOutput: (newOverwrite: boolean) => void;
3
- export declare const getShouldOverwrite: () => boolean;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getShouldOverwrite = exports.setOverwriteOutput = exports.DEFAULT_OVERWRITE = void 0;
4
- exports.DEFAULT_OVERWRITE = true;
5
- let shouldOverwrite = exports.DEFAULT_OVERWRITE;
6
- const setOverwriteOutput = (newOverwrite) => {
7
- if (typeof newOverwrite !== 'boolean') {
8
- throw new Error(`overwriteExisting must be a boolean but got ${typeof newOverwrite} (${JSON.stringify(newOverwrite)})`);
9
- }
10
- shouldOverwrite = newOverwrite;
11
- };
12
- exports.setOverwriteOutput = setOverwriteOutput;
13
- const getShouldOverwrite = () => shouldOverwrite;
14
- exports.getShouldOverwrite = getShouldOverwrite;
@@ -1,8 +0,0 @@
1
- import { Codec } from './codec';
2
- declare const validOptions: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
3
- export declare type PixelFormat = typeof validOptions[number];
4
- export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
5
- export declare const setPixelFormat: (format: PixelFormat) => void;
6
- export declare const getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
7
- export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat, codec: Codec) => void;
8
- export {};
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateSelectedPixelFormatAndCodecCombination = exports.getPixelFormat = exports.setPixelFormat = exports.DEFAULT_PIXEL_FORMAT = void 0;
4
- const validOptions = [
5
- 'yuv420p',
6
- 'yuva420p',
7
- 'yuv422p',
8
- 'yuv444p',
9
- 'yuv420p10le',
10
- 'yuv422p10le',
11
- 'yuv444p10le',
12
- 'yuva444p10le',
13
- ];
14
- exports.DEFAULT_PIXEL_FORMAT = 'yuv420p';
15
- let currentPixelFormat = exports.DEFAULT_PIXEL_FORMAT;
16
- const setPixelFormat = (format) => {
17
- if (!validOptions.includes(format)) {
18
- throw new TypeError(`Value ${format} is not valid as a pixel format.`);
19
- }
20
- currentPixelFormat = format;
21
- };
22
- exports.setPixelFormat = setPixelFormat;
23
- const getPixelFormat = () => {
24
- return currentPixelFormat;
25
- };
26
- exports.getPixelFormat = getPixelFormat;
27
- const validateSelectedPixelFormatAndCodecCombination = (pixelFormat, codec) => {
28
- if (!validOptions.includes(pixelFormat)) {
29
- throw new TypeError(`Value ${pixelFormat} is not valid as a pixel format.`);
30
- }
31
- if (pixelFormat !== 'yuva420p') {
32
- return;
33
- }
34
- if (codec !== 'vp8' && codec !== 'vp9') {
35
- throw new TypeError("Pixel format was set to 'yuva420p' but codec is not 'vp8' or 'vp9'. To render videos with alpha channel, you must choose a codec that supports it.");
36
- }
37
- };
38
- exports.validateSelectedPixelFormatAndCodecCombination = validateSelectedPixelFormatAndCodecCombination;
@@ -1,2 +0,0 @@
1
- export declare const setPort: (port: number | undefined) => void;
2
- export declare const getServerPort: () => number | undefined;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getServerPort = exports.setPort = void 0;
4
- let serverPort;
5
- const setPort = (port) => {
6
- if (!['number', 'undefined'].includes(typeof port)) {
7
- throw new Error(`Preview server port should be a number. Got ${typeof port} (${JSON.stringify(port)})`);
8
- }
9
- if (port === undefined) {
10
- serverPort = undefined;
11
- return;
12
- }
13
- if (port < 1 || port > 65535) {
14
- throw new Error(`Preview server port should be a number between 1 and 65535. Got ${port}`);
15
- }
16
- serverPort = port;
17
- };
18
- exports.setPort = setPort;
19
- const getServerPort = () => serverPort;
20
- exports.getServerPort = getServerPort;
@@ -1,7 +0,0 @@
1
- import { Codec } from './codec';
2
- declare const proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
3
- export declare type ProResProfile = typeof proResProfileOptions[number];
4
- export declare const getProResProfile: () => ProResProfile | undefined;
5
- export declare const setProResProfile: (profile: ProResProfile | undefined) => void;
6
- export declare const validateSelectedCodecAndProResCombination: (actualCodec: Codec, actualProResProfile: ProResProfile | undefined) => void;
7
- export {};
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateSelectedCodecAndProResCombination = exports.setProResProfile = exports.getProResProfile = void 0;
4
- const proResProfileOptions = [
5
- '4444-xq',
6
- '4444',
7
- 'hq',
8
- 'standard',
9
- 'light',
10
- 'proxy',
11
- ];
12
- let proResProfile;
13
- const getProResProfile = () => {
14
- return proResProfile;
15
- };
16
- exports.getProResProfile = getProResProfile;
17
- const setProResProfile = (profile) => {
18
- proResProfile = profile;
19
- };
20
- exports.setProResProfile = setProResProfile;
21
- const validateSelectedCodecAndProResCombination = (actualCodec, actualProResProfile) => {
22
- if (typeof actualProResProfile !== 'undefined' && actualCodec !== 'prores') {
23
- throw new TypeError('You have set a ProRes profile but the codec is not "prores". Set the codec to "prores" or remove the ProRes profile.');
24
- }
25
- if (actualProResProfile !== undefined &&
26
- !proResProfileOptions.includes(actualProResProfile)) {
27
- throw new TypeError(`The ProRes profile "${actualProResProfile}" is not valid. Valid options are ${proResProfileOptions
28
- .map((p) => `"${p}"`)
29
- .join(', ')}`);
30
- }
31
- };
32
- exports.validateSelectedCodecAndProResCombination = validateSelectedCodecAndProResCombination;
@@ -1,2 +0,0 @@
1
- export declare const setQuality: (q: number | undefined) => void;
2
- export declare const getQuality: () => number | undefined;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getQuality = exports.setQuality = void 0;
4
- const validate_quality_1 = require("../validation/validate-quality");
5
- const defaultValue = undefined;
6
- let quality = defaultValue;
7
- const setQuality = (q) => {
8
- (0, validate_quality_1.validateQuality)(q);
9
- if (q === 0 || q === undefined) {
10
- quality = defaultValue;
11
- return;
12
- }
13
- quality = q;
14
- };
15
- exports.setQuality = setQuality;
16
- const getQuality = () => quality;
17
- exports.getQuality = getQuality;
@@ -1,3 +0,0 @@
1
- export declare type Scale = number;
2
- export declare const setScale: (newScale: Scale) => void;
3
- export declare const getScale: () => number;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getScale = exports.setScale = void 0;
4
- let currentScale = 1;
5
- const setScale = (newScale) => {
6
- if (typeof newScale !== 'number') {
7
- throw new Error('--scale flag must be a number.');
8
- }
9
- currentScale = newScale;
10
- };
11
- exports.setScale = setScale;
12
- const getScale = () => {
13
- return currentScale;
14
- };
15
- exports.getScale = getScale;
@@ -1,2 +0,0 @@
1
- export declare const setStillFrame: (frame: number) => void;
2
- export declare const getStillFrame: () => number;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStillFrame = exports.setStillFrame = void 0;
4
- const validate_frame_1 = require("../validation/validate-frame");
5
- let stillFrame = 0;
6
- const setStillFrame = (frame) => {
7
- (0, validate_frame_1.validateFrame)(frame, Infinity);
8
- stillFrame = frame;
9
- };
10
- exports.setStillFrame = setStillFrame;
11
- const getStillFrame = () => stillFrame;
12
- exports.getStillFrame = getStillFrame;
@@ -1,2 +0,0 @@
1
- export declare const setPuppeteerTimeout: (newPuppeteerTimeout: number) => void;
2
- export declare const getCurrentPuppeteerTimeout: () => number;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCurrentPuppeteerTimeout = exports.setPuppeteerTimeout = void 0;
4
- const timeout_1 = require("../timeout");
5
- let currentTimeout = timeout_1.DEFAULT_PUPPETEER_TIMEOUT;
6
- const setPuppeteerTimeout = (newPuppeteerTimeout) => {
7
- if (typeof newPuppeteerTimeout !== 'number') {
8
- throw new Error('--timeout flag / setTimeoutInMilliseconds() must be a number, but got ' +
9
- JSON.stringify(newPuppeteerTimeout));
10
- }
11
- currentTimeout = newPuppeteerTimeout;
12
- };
13
- exports.setPuppeteerTimeout = setPuppeteerTimeout;
14
- const getCurrentPuppeteerTimeout = () => {
15
- return currentTimeout;
16
- };
17
- exports.getCurrentPuppeteerTimeout = getCurrentPuppeteerTimeout;
@@ -1,3 +0,0 @@
1
- export declare const DEFAULT_WEBPACK_CACHE_ENABLED = true;
2
- export declare const setWebpackCaching: (flag: boolean) => void;
3
- export declare const getWebpackCaching: () => boolean;