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,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getWebpackCaching = exports.setWebpackCaching = exports.DEFAULT_WEBPACK_CACHE_ENABLED = void 0;
4
- exports.DEFAULT_WEBPACK_CACHE_ENABLED = true;
5
- let webpackCaching = exports.DEFAULT_WEBPACK_CACHE_ENABLED;
6
- const setWebpackCaching = (flag) => {
7
- if (typeof flag !== 'boolean') {
8
- throw new TypeError('Caching flag must be a boolean.');
9
- }
10
- webpackCaching = flag;
11
- };
12
- exports.setWebpackCaching = setWebpackCaching;
13
- const getWebpackCaching = () => {
14
- return webpackCaching;
15
- };
16
- exports.getWebpackCaching = getWebpackCaching;
@@ -1 +0,0 @@
1
- export declare const FEATURE_FLAG_FIREFOX_SUPPORT = false;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FEATURE_FLAG_FIREFOX_SUPPORT = void 0;
4
- // There is no Firefox support yet, the waitForFunction method
5
- // does not yet work and downloading has a bug.
6
- // Disabling this for now!
7
- exports.FEATURE_FLAG_FIREFOX_SUPPORT = false;
@@ -1,2 +0,0 @@
1
- export declare const INITIAL_FRAME_LOCAL_STORAGE_KEY = "remotion.initialFrame";
2
- export declare const setupInitialFrame: () => void;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setupInitialFrame = exports.INITIAL_FRAME_LOCAL_STORAGE_KEY = void 0;
4
- exports.INITIAL_FRAME_LOCAL_STORAGE_KEY = 'remotion.initialFrame';
5
- const getInitialFrame = () => {
6
- const param = localStorage.getItem(exports.INITIAL_FRAME_LOCAL_STORAGE_KEY);
7
- return param ? Number(param) : 0;
8
- };
9
- const setupInitialFrame = () => {
10
- window.remotion_initialFrame = getInitialFrame();
11
- };
12
- exports.setupInitialFrame = setupInitialFrame;
@@ -1,2 +0,0 @@
1
- import { Codec } from './config';
2
- export declare const isAudioCodec: (codec: Codec | undefined) => boolean;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAudioCodec = void 0;
4
- const isAudioCodec = (codec) => {
5
- return codec === 'mp3' || codec === 'aac' || codec === 'wav';
6
- };
7
- exports.isAudioCodec = isAudioCodec;
@@ -1,5 +0,0 @@
1
- declare type PerfId = 'activate-target' | 'capture' | 'save';
2
- export declare const startPerfMeasure: (marker: PerfId) => number;
3
- export declare const stopPerfMeasure: (id: number) => void;
4
- export declare const logPerf: () => void;
5
- export {};
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logPerf = exports.stopPerfMeasure = exports.startPerfMeasure = void 0;
4
- const perf = {
5
- 'activate-target': [],
6
- capture: [],
7
- save: [],
8
- };
9
- const map = {};
10
- const startPerfMeasure = (marker) => {
11
- const id = Math.random();
12
- map[id] = {
13
- id,
14
- marker,
15
- start: Date.now(),
16
- };
17
- return id;
18
- };
19
- exports.startPerfMeasure = startPerfMeasure;
20
- const stopPerfMeasure = (id) => {
21
- const now = Date.now();
22
- const diff = now - map[id].start;
23
- perf[map[id].marker].push(diff);
24
- delete map[id];
25
- };
26
- exports.stopPerfMeasure = stopPerfMeasure;
27
- const logPerf = () => {
28
- console.log('Render performance:');
29
- Object.keys(perf).forEach((p) => {
30
- console.log(` ${p} => ${perf[p].reduce((a, b) => a + b, 0) / perf[p].length} (n = ${perf[p].length})`);
31
- });
32
- };
33
- exports.logPerf = logPerf;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export declare type TimelineInOutContextValue = {
3
- inFrame: number | null;
4
- outFrame: number | null;
5
- };
6
- export declare type SetTimelineInOutContextValue = {
7
- setInAndOutFrames: (u: React.SetStateAction<TimelineInOutContextValue>) => void;
8
- };
9
- export declare const TimelineInOutContext: React.Context<TimelineInOutContextValue>;
10
- export declare const SetTimelineInOutContext: React.Context<SetTimelineInOutContextValue>;
11
- export declare const useTimelineInOutFramePosition: () => TimelineInOutContextValue;
12
- export declare const useTimelineSetInOutFramePosition: () => SetTimelineInOutContextValue;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useTimelineSetInOutFramePosition = exports.useTimelineInOutFramePosition = exports.SetTimelineInOutContext = exports.TimelineInOutContext = void 0;
4
- const react_1 = require("react");
5
- exports.TimelineInOutContext = (0, react_1.createContext)({
6
- inFrame: null,
7
- outFrame: null,
8
- });
9
- exports.SetTimelineInOutContext = (0, react_1.createContext)({
10
- setInAndOutFrames: () => {
11
- throw new Error('default');
12
- },
13
- });
14
- const useTimelineInOutFramePosition = () => {
15
- const state = (0, react_1.useContext)(exports.TimelineInOutContext);
16
- return state;
17
- };
18
- exports.useTimelineInOutFramePosition = useTimelineInOutFramePosition;
19
- const useTimelineSetInOutFramePosition = () => {
20
- const { setInAndOutFrames } = (0, react_1.useContext)(exports.SetTimelineInOutContext);
21
- return { setInAndOutFrames };
22
- };
23
- exports.useTimelineSetInOutFramePosition = useTimelineSetInOutFramePosition;
package/dist/timeout.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const DEFAULT_PUPPETEER_TIMEOUT = 30000;
2
- export declare const setupPuppeteerTimeout: () => void;
package/dist/timeout.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setupPuppeteerTimeout = exports.DEFAULT_PUPPETEER_TIMEOUT = void 0;
4
- exports.DEFAULT_PUPPETEER_TIMEOUT = 30000;
5
- const getPuppeteerTimeout = () => {
6
- const param = window.remotion_puppeteerTimeout;
7
- return param ? Number(param) : exports.DEFAULT_PUPPETEER_TIMEOUT;
8
- };
9
- const setupPuppeteerTimeout = () => {
10
- window.remotion_puppeteerTimeout = getPuppeteerTimeout();
11
- };
12
- exports.setupPuppeteerTimeout = setupPuppeteerTimeout;
package/dist/use-frame.js DELETED
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCurrentFrame = exports.useAbsoluteCurrentFrame = void 0;
4
- const react_1 = require("react");
5
- const sequencing_1 = require("./sequencing");
6
- const timeline_position_state_1 = require("./timeline-position-state");
7
- const useAbsoluteCurrentFrame = () => {
8
- const timelinePosition = (0, timeline_position_state_1.useTimelinePosition)();
9
- return timelinePosition;
10
- };
11
- exports.useAbsoluteCurrentFrame = useAbsoluteCurrentFrame;
12
- /**
13
- * Get the current frame of the video.
14
- * Frames are 0-indexed, meaning the first frame is 0, the last frame is the duration of the composition in frames minus one.
15
- * @link https://www.remotion.dev/docs/use-current-frame
16
- */
17
- const useCurrentFrame = () => {
18
- const frame = (0, exports.useAbsoluteCurrentFrame)();
19
- const context = (0, react_1.useContext)(sequencing_1.SequenceContext);
20
- const contextOffset = context
21
- ? context.cumulatedFrom + context.relativeFrom
22
- : 0;
23
- return frame - contextOffset;
24
- };
25
- exports.useCurrentFrame = useCurrentFrame;
@@ -1 +0,0 @@
1
- export declare const validateFrame: (frame: number, durationInFrames: number) => void;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateFrame = void 0;
4
- const validateFrame = (frame, durationInFrames) => {
5
- if (typeof frame === 'undefined') {
6
- throw new TypeError(`Argument missing for parameter "frame"`);
7
- }
8
- if (typeof frame !== 'number') {
9
- throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
10
- }
11
- if (frame < 0) {
12
- throw new RangeError(`Frame ${frame} cannot be negative`);
13
- }
14
- if (!Number.isFinite(frame)) {
15
- throw new RangeError(`Frame ${frame} is not finite`);
16
- }
17
- if (frame % 1 !== 0) {
18
- throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
19
- }
20
- if (frame > durationInFrames - 1) {
21
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
22
- }
23
- };
24
- exports.validateFrame = validateFrame;
@@ -1,2 +0,0 @@
1
- import { ImageFormat } from '../config';
2
- export declare const validateNonNullImageFormat: (imageFormat: ImageFormat) => void;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateNonNullImageFormat = void 0;
4
- const validateNonNullImageFormat = (imageFormat) => {
5
- if (imageFormat !== 'jpeg' && imageFormat !== 'png') {
6
- throw new TypeError('Image format should be either "png" or "jpeg"');
7
- }
8
- };
9
- exports.validateNonNullImageFormat = validateNonNullImageFormat;
@@ -1,4 +0,0 @@
1
- declare const validRenderers: readonly ["angle", "egl", "swiftshader"];
2
- export declare type OpenGlRenderer = typeof validRenderers[number];
3
- export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
4
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateOpenGlRenderer = void 0;
4
- const validRenderers = ['angle', 'egl', 'swiftshader'];
5
- const validateOpenGlRenderer = (option) => {
6
- if (option === null) {
7
- return null;
8
- }
9
- if (!validRenderers.includes(option)) {
10
- throw new TypeError(`${option} is not a valid GL backend. Accepted values: ${validRenderers.join(', ')}`);
11
- }
12
- return option;
13
- };
14
- exports.validateOpenGlRenderer = validateOpenGlRenderer;
@@ -1 +0,0 @@
1
- export declare const validateQuality: (q: number | undefined) => void;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateQuality = void 0;
4
- const validateQuality = (q) => {
5
- if (typeof q !== 'undefined' && typeof q !== 'number') {
6
- throw new Error(`Quality option must be a number or undefined. Got ${typeof q} (${JSON.stringify(q)})`);
7
- }
8
- if (typeof q === 'undefined') {
9
- return;
10
- }
11
- if (!Number.isFinite(q)) {
12
- throw new RangeError(`Quality must be a finite number, but is ${q}`);
13
- }
14
- if (Number.isNaN(q)) {
15
- throw new RangeError(`Quality is NaN, but must be a real number`);
16
- }
17
- if (q > 100 || q < 0) {
18
- throw new RangeError('Quality option must be between 0 and 100.');
19
- }
20
- };
21
- exports.validateQuality = validateQuality;