remotion 4.0.140 → 4.0.142
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/cjs/CompositionManager.d.ts +3 -2
- package/dist/cjs/audio/AudioForRendering.js +3 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/no-react.d.ts +3 -0
- package/dist/cjs/no-react.js +4 -0
- package/dist/cjs/use-media-buffering.js +7 -0
- package/dist/cjs/v5-flag.d.ts +1 -0
- package/dist/cjs/v5-flag.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/OffthreadVideoForRendering.js +3 -0
- package/dist/cjs/video/VideoForRendering.js +3 -0
- package/dist/esm/index.mjs +17 -2
- package/dist/esm/no-react.mjs +5 -0
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -66,12 +66,13 @@ export type TRenderAsset = {
|
|
|
66
66
|
playbackRate: number;
|
|
67
67
|
allowAmplificationDuringRender: boolean;
|
|
68
68
|
toneFrequency: number | null;
|
|
69
|
+
audioStartFrame: number;
|
|
69
70
|
};
|
|
70
71
|
export declare const compositionsRef: React.RefObject<{
|
|
71
72
|
getCompositions: () => TCompMetadataWithCalcFunction<AnyZodObject, Record<string, unknown>>[];
|
|
72
73
|
}>;
|
|
73
74
|
export declare const CompositionManagerProvider: React.FC<{
|
|
74
|
-
children: React.ReactNode;
|
|
75
|
-
numberOfAudioTags: number;
|
|
75
|
+
readonly children: React.ReactNode;
|
|
76
|
+
readonly numberOfAudioTags: number;
|
|
76
77
|
}>;
|
|
77
78
|
export {};
|
|
@@ -41,7 +41,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
41
41
|
return audioRef.current;
|
|
42
42
|
}, []);
|
|
43
43
|
(0, react_1.useEffect)(() => {
|
|
44
|
-
var _a;
|
|
44
|
+
var _a, _b;
|
|
45
45
|
if (!props.src) {
|
|
46
46
|
throw new Error('No src passed');
|
|
47
47
|
}
|
|
@@ -64,6 +64,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
64
64
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
65
65
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
66
66
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
67
|
+
audioStartFrame: -((_b = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _b !== void 0 ? _b : 0),
|
|
67
68
|
});
|
|
68
69
|
return () => unregisterRenderAsset(id);
|
|
69
70
|
}, [
|
|
@@ -80,6 +81,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
80
81
|
props.playbackRate,
|
|
81
82
|
allowAmplificationDuringRender,
|
|
82
83
|
toneFrequency,
|
|
84
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
83
85
|
]);
|
|
84
86
|
const { src } = props;
|
|
85
87
|
// The <audio> tag is only rendered if the duration needs to be calculated for the `loop`
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare global {
|
|
|
48
48
|
remotion_isStudio: boolean;
|
|
49
49
|
remotion_isBuilding: undefined | (() => void);
|
|
50
50
|
remotion_finishedBuilding: undefined | (() => void);
|
|
51
|
-
siteVersion: '
|
|
51
|
+
siteVersion: '11';
|
|
52
52
|
remotion_version: string;
|
|
53
53
|
remotion_imported: string | boolean;
|
|
54
54
|
remotion_unsavedProps: boolean | undefined;
|
package/dist/cjs/no-react.d.ts
CHANGED
package/dist/cjs/no-react.js
CHANGED
|
@@ -9,6 +9,7 @@ const delay_render_1 = require("./delay-render");
|
|
|
9
9
|
const input_props_serialization_1 = require("./input-props-serialization");
|
|
10
10
|
const interpolate_colors_1 = require("./interpolate-colors");
|
|
11
11
|
const truthy_1 = require("./truthy");
|
|
12
|
+
const v5_flag_1 = require("./v5-flag");
|
|
12
13
|
const validate_frame_1 = require("./validate-frame");
|
|
13
14
|
const validate_default_props_1 = require("./validation/validate-default-props");
|
|
14
15
|
const validate_dimensions_1 = require("./validation/validate-dimensions");
|
|
@@ -33,4 +34,7 @@ exports.NoReactInternals = {
|
|
|
33
34
|
DELAY_RENDER_ATTEMPT_TOKEN: delay_render_1.DELAY_RENDER_RETRIES_LEFT,
|
|
34
35
|
getOffthreadVideoSource: offthread_video_source_1.getOffthreadVideoSource,
|
|
35
36
|
getExpectedMediaFrameUncorrected: get_current_time_1.getExpectedMediaFrameUncorrected,
|
|
37
|
+
ENABLE_V5_BREAKING_CHANGES: v5_flag_1.ENABLE_V5_BREAKING_CHANGES,
|
|
38
|
+
MIN_NODE_VERSION: v5_flag_1.ENABLE_V5_BREAKING_CHANGES ? 18 : 16,
|
|
39
|
+
MIN_BUN_VERSION: v5_flag_1.ENABLE_V5_BREAKING_CHANGES ? '1.1.3' : '1.0.3',
|
|
36
40
|
};
|
|
@@ -22,11 +22,18 @@ const useMediaBuffering = ({ element, shouldBuffer, isPremounting, }) => {
|
|
|
22
22
|
const onCanPlay = () => {
|
|
23
23
|
unblock();
|
|
24
24
|
};
|
|
25
|
+
const onError = () => {
|
|
26
|
+
unblock();
|
|
27
|
+
};
|
|
25
28
|
current.addEventListener('canplay', onCanPlay, {
|
|
26
29
|
once: true,
|
|
27
30
|
});
|
|
31
|
+
current.addEventListener('error', onError, {
|
|
32
|
+
once: true,
|
|
33
|
+
});
|
|
28
34
|
cleanup = () => {
|
|
29
35
|
current.removeEventListener('canplay', onCanPlay);
|
|
36
|
+
current.removeEventListener('error', onError);
|
|
30
37
|
unblock();
|
|
31
38
|
return undefined;
|
|
32
39
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ENABLE_V5_BREAKING_CHANGES: false;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.142";
|
package/dist/cjs/version.js
CHANGED
|
@@ -47,6 +47,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
47
47
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
48
48
|
});
|
|
49
49
|
(0, react_1.useEffect)(() => {
|
|
50
|
+
var _a;
|
|
50
51
|
if (!src) {
|
|
51
52
|
throw new Error('No src passed');
|
|
52
53
|
}
|
|
@@ -69,6 +70,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
69
70
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
70
71
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
71
72
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
73
|
+
audioStartFrame: -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0),
|
|
72
74
|
});
|
|
73
75
|
return () => unregisterRenderAsset(id);
|
|
74
76
|
}, [
|
|
@@ -83,6 +85,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
83
85
|
playbackRate,
|
|
84
86
|
allowAmplificationDuringRender,
|
|
85
87
|
toneFrequency,
|
|
88
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
86
89
|
]);
|
|
87
90
|
const currentTime = (0, react_1.useMemo)(() => {
|
|
88
91
|
return ((0, get_current_time_js_1.getExpectedMediaFrameUncorrected)({
|
|
@@ -48,6 +48,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
48
48
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
49
49
|
});
|
|
50
50
|
(0, react_1.useEffect)(() => {
|
|
51
|
+
var _a;
|
|
51
52
|
if (!props.src) {
|
|
52
53
|
throw new Error('No src passed');
|
|
53
54
|
}
|
|
@@ -70,6 +71,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
70
71
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
71
72
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
72
73
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
74
|
+
audioStartFrame: -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0),
|
|
73
75
|
});
|
|
74
76
|
return () => unregisterRenderAsset(id);
|
|
75
77
|
}, [
|
|
@@ -84,6 +86,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
84
86
|
playbackRate,
|
|
85
87
|
allowAmplificationDuringRender,
|
|
86
88
|
toneFrequency,
|
|
89
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
87
90
|
]);
|
|
88
91
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
89
92
|
return videoRef.current;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -105,7 +105,7 @@ function truthy(value) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// Automatically generated on publish
|
|
108
|
-
const VERSION = '4.0.
|
|
108
|
+
const VERSION = '4.0.142';
|
|
109
109
|
|
|
110
110
|
const checkMultipleRemotionVersions = () => {
|
|
111
111
|
if (typeof globalThis === 'undefined') {
|
|
@@ -1660,11 +1660,18 @@ const useMediaBuffering = ({ element, shouldBuffer, isPremounting, }) => {
|
|
|
1660
1660
|
const onCanPlay = () => {
|
|
1661
1661
|
unblock();
|
|
1662
1662
|
};
|
|
1663
|
+
const onError = () => {
|
|
1664
|
+
unblock();
|
|
1665
|
+
};
|
|
1663
1666
|
current.addEventListener('canplay', onCanPlay, {
|
|
1664
1667
|
once: true,
|
|
1665
1668
|
});
|
|
1669
|
+
current.addEventListener('error', onError, {
|
|
1670
|
+
once: true,
|
|
1671
|
+
});
|
|
1666
1672
|
cleanup = () => {
|
|
1667
1673
|
current.removeEventListener('canplay', onCanPlay);
|
|
1674
|
+
current.removeEventListener('error', onError);
|
|
1668
1675
|
unblock();
|
|
1669
1676
|
return undefined;
|
|
1670
1677
|
};
|
|
@@ -2782,7 +2789,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
2782
2789
|
return audioRef.current;
|
|
2783
2790
|
}, []);
|
|
2784
2791
|
useEffect(() => {
|
|
2785
|
-
var _a;
|
|
2792
|
+
var _a, _b;
|
|
2786
2793
|
if (!props.src) {
|
|
2787
2794
|
throw new Error('No src passed');
|
|
2788
2795
|
}
|
|
@@ -2805,6 +2812,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
2805
2812
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
2806
2813
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
2807
2814
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
2815
|
+
audioStartFrame: -((_b = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _b !== void 0 ? _b : 0),
|
|
2808
2816
|
});
|
|
2809
2817
|
return () => unregisterRenderAsset(id);
|
|
2810
2818
|
}, [
|
|
@@ -2821,6 +2829,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
2821
2829
|
props.playbackRate,
|
|
2822
2830
|
allowAmplificationDuringRender,
|
|
2823
2831
|
toneFrequency,
|
|
2832
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
2824
2833
|
]);
|
|
2825
2834
|
const { src } = props;
|
|
2826
2835
|
// The <audio> tag is only rendered if the duration needs to be calculated for the `loop`
|
|
@@ -4810,6 +4819,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
4810
4819
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
4811
4820
|
});
|
|
4812
4821
|
useEffect(() => {
|
|
4822
|
+
var _a;
|
|
4813
4823
|
if (!src) {
|
|
4814
4824
|
throw new Error('No src passed');
|
|
4815
4825
|
}
|
|
@@ -4832,6 +4842,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
4832
4842
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
4833
4843
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
4834
4844
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
4845
|
+
audioStartFrame: -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0),
|
|
4835
4846
|
});
|
|
4836
4847
|
return () => unregisterRenderAsset(id);
|
|
4837
4848
|
}, [
|
|
@@ -4846,6 +4857,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
4846
4857
|
playbackRate,
|
|
4847
4858
|
allowAmplificationDuringRender,
|
|
4848
4859
|
toneFrequency,
|
|
4860
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
4849
4861
|
]);
|
|
4850
4862
|
const currentTime = useMemo(() => {
|
|
4851
4863
|
return (getExpectedMediaFrameUncorrected({
|
|
@@ -5168,6 +5180,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
5168
5180
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
5169
5181
|
});
|
|
5170
5182
|
useEffect(() => {
|
|
5183
|
+
var _a;
|
|
5171
5184
|
if (!props.src) {
|
|
5172
5185
|
throw new Error('No src passed');
|
|
5173
5186
|
}
|
|
@@ -5190,6 +5203,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
5190
5203
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
5191
5204
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
5192
5205
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
5206
|
+
audioStartFrame: -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0),
|
|
5193
5207
|
});
|
|
5194
5208
|
return () => unregisterRenderAsset(id);
|
|
5195
5209
|
}, [
|
|
@@ -5204,6 +5218,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
5204
5218
|
playbackRate,
|
|
5205
5219
|
allowAmplificationDuringRender,
|
|
5206
5220
|
toneFrequency,
|
|
5221
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
5207
5222
|
]);
|
|
5208
5223
|
useImperativeHandle(ref, () => {
|
|
5209
5224
|
return videoRef.current;
|
package/dist/esm/no-react.mjs
CHANGED
|
@@ -655,6 +655,8 @@ function processColor(color) {
|
|
|
655
655
|
return ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
+
const ENABLE_V5_BREAKING_CHANGES = false;
|
|
659
|
+
|
|
658
660
|
const validateFrame = ({ allowFloats, durationInFrames, frame, }) => {
|
|
659
661
|
if (typeof frame === 'undefined') {
|
|
660
662
|
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
@@ -776,6 +778,9 @@ const NoReactInternals = {
|
|
|
776
778
|
DELAY_RENDER_ATTEMPT_TOKEN: DELAY_RENDER_RETRIES_LEFT,
|
|
777
779
|
getOffthreadVideoSource,
|
|
778
780
|
getExpectedMediaFrameUncorrected,
|
|
781
|
+
ENABLE_V5_BREAKING_CHANGES,
|
|
782
|
+
MIN_NODE_VERSION: 16,
|
|
783
|
+
MIN_BUN_VERSION: '1.0.3',
|
|
779
784
|
};
|
|
780
785
|
|
|
781
786
|
export { NoReactInternals, interpolate, random };
|
package/dist/esm/version.mjs
CHANGED