remotion 4.0.530 → 4.0.532
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/AbsoluteFill.d.ts +0 -6
- package/dist/cjs/HtmlInCanvas.d.ts +33 -15
- package/dist/cjs/HtmlInCanvas.js +5 -3
- package/dist/cjs/Img.d.ts +0 -6
- package/dist/cjs/Interactive.d.ts +0 -12
- package/dist/cjs/Interactive.js +9 -1
- package/dist/cjs/animated-image/AnimatedImage.d.ts +6 -6
- package/dist/cjs/animated-image/AnimatedImage.js +1 -0
- package/dist/cjs/canvas-image/CanvasImage.d.ts +0 -6
- package/dist/cjs/effects/Solid.d.ts +0 -6
- package/dist/cjs/interactivity-schema.d.ts +0 -30
- package/dist/cjs/interactivity-schema.js +0 -3
- package/dist/cjs/internals.d.ts +2 -12
- package/dist/cjs/internals.js +3 -0
- package/dist/cjs/no-react.d.ts +0 -6
- package/dist/cjs/nonce.d.ts +11 -0
- package/dist/cjs/nonce.js +42 -0
- package/dist/cjs/react-refresh-event.d.ts +2 -0
- package/dist/cjs/react-refresh-event.js +8 -0
- package/dist/cjs/series/index.js +0 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +33 -26
- package/dist/esm/no-react.mjs +0 -8
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -233,12 +233,6 @@ export declare const absoluteFillSchema: {
|
|
|
233
233
|
readonly hiddenFromList: false;
|
|
234
234
|
readonly keyframable: false;
|
|
235
235
|
};
|
|
236
|
-
readonly loop: {
|
|
237
|
-
readonly type: "boolean";
|
|
238
|
-
readonly default: false;
|
|
239
|
-
readonly description: "Loop";
|
|
240
|
-
readonly keyframable: false;
|
|
241
|
-
};
|
|
242
236
|
readonly freeze: {
|
|
243
237
|
readonly type: "number";
|
|
244
238
|
readonly default: null;
|
|
@@ -3,24 +3,41 @@ import type { EffectsProp } from './effects/effect-types.js';
|
|
|
3
3
|
import type { InteractiveBaseProps, InteractiveCropProps } from './Interactive.js';
|
|
4
4
|
import type { AbsoluteFillLayout } from './Sequence.js';
|
|
5
5
|
declare global {
|
|
6
|
+
interface DrawElementImageOptions {
|
|
7
|
+
preserveElementGeometry?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface WebGLCopyElementImageConfig {
|
|
10
|
+
sx?: GLfloat;
|
|
11
|
+
sy?: GLfloat;
|
|
12
|
+
swidth?: GLfloat;
|
|
13
|
+
sheight?: GLfloat;
|
|
14
|
+
width?: GLsizei;
|
|
15
|
+
height?: GLsizei;
|
|
16
|
+
}
|
|
17
|
+
interface UpdateElementGeometryOptions {
|
|
18
|
+
preserveHitTestOrder?: boolean;
|
|
19
|
+
clip?: DOMRectInit;
|
|
20
|
+
canvasTransform?: DOMMatrixInit;
|
|
21
|
+
}
|
|
6
22
|
interface ElementImage {
|
|
7
23
|
readonly width: number;
|
|
8
24
|
readonly height: number;
|
|
9
25
|
close(): void;
|
|
10
26
|
}
|
|
11
27
|
interface CanvasRenderingContext2D {
|
|
12
|
-
drawElementImage(element: Element | ElementImage, dx: number, dy: number):
|
|
13
|
-
drawElementImage(element: Element | ElementImage, dx: number, dy: number, dwidth: number, dheight: number):
|
|
14
|
-
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number):
|
|
15
|
-
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number, dwidth: number, dheight: number):
|
|
28
|
+
drawElementImage(element: Element | ElementImage, dx: number, dy: number, options?: DrawElementImageOptions): void;
|
|
29
|
+
drawElementImage(element: Element | ElementImage, dx: number, dy: number, dwidth: number, dheight: number, options?: DrawElementImageOptions): void;
|
|
30
|
+
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number, options?: DrawElementImageOptions): void;
|
|
31
|
+
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number, dwidth: number, dheight: number, options?: DrawElementImageOptions): void;
|
|
16
32
|
}
|
|
17
33
|
interface OffscreenCanvasRenderingContext2D {
|
|
18
|
-
drawElementImage(element: Element | ElementImage, dx: number, dy: number):
|
|
19
|
-
drawElementImage(element: Element | ElementImage, dx: number, dy: number, dwidth: number, dheight: number):
|
|
20
|
-
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number):
|
|
21
|
-
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number, dwidth: number, dheight: number):
|
|
34
|
+
drawElementImage(element: Element | ElementImage, dx: number, dy: number, options?: DrawElementImageOptions): void;
|
|
35
|
+
drawElementImage(element: Element | ElementImage, dx: number, dy: number, dwidth: number, dheight: number, options?: DrawElementImageOptions): void;
|
|
36
|
+
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number, options?: DrawElementImageOptions): void;
|
|
37
|
+
drawElementImage(element: Element | ElementImage, sx: number, sy: number, swidth: number, sheight: number, dx: number, dy: number, dwidth: number, dheight: number, options?: DrawElementImageOptions): void;
|
|
22
38
|
}
|
|
23
39
|
interface WebGLRenderingContextBase {
|
|
40
|
+
texElementSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, element: Element | ElementImage, config?: WebGLCopyElementImageConfig): void;
|
|
24
41
|
texElementImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, element: Element | ElementImage): void;
|
|
25
42
|
texElementImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, element: Element | ElementImage): void;
|
|
26
43
|
texElementImage2D(target: GLenum, level: GLint, internalformat: GLint, sx: GLfloat, sy: GLfloat, swidth: GLfloat, sheight: GLfloat, format: GLenum, type: GLenum, element: Element | ElementImage): void;
|
|
@@ -30,11 +47,18 @@ declare global {
|
|
|
30
47
|
paint: Event;
|
|
31
48
|
}
|
|
32
49
|
interface HTMLCanvasElement {
|
|
50
|
+
content: string;
|
|
33
51
|
layoutSubtree?: boolean;
|
|
34
52
|
onpaint: ((this: HTMLCanvasElement, ev: Event) => unknown) | null;
|
|
35
53
|
requestPaint?(): void;
|
|
36
54
|
captureElementImage(element: Element): ElementImage;
|
|
37
|
-
|
|
55
|
+
updateElementGeometry(element: Element | ElementImage, options?: UpdateElementGeometryOptions): void;
|
|
56
|
+
clearElementGeometry(element: Element | ElementImage): void;
|
|
57
|
+
getElementTransform(element: Element): DOMMatrix;
|
|
58
|
+
}
|
|
59
|
+
interface OffscreenCanvas {
|
|
60
|
+
updateElementGeometry(element: Element | ElementImage, options?: UpdateElementGeometryOptions): void;
|
|
61
|
+
clearElementGeometry(element: Element | ElementImage): void;
|
|
38
62
|
}
|
|
39
63
|
}
|
|
40
64
|
export type HtmlInCanvasOnPaintParams = {
|
|
@@ -264,12 +288,6 @@ export declare const htmlInCanvasSchema: {
|
|
|
264
288
|
readonly hiddenFromList: false;
|
|
265
289
|
readonly keyframable: false;
|
|
266
290
|
};
|
|
267
|
-
readonly loop: {
|
|
268
|
-
readonly type: "boolean";
|
|
269
|
-
readonly default: false;
|
|
270
|
-
readonly description: "Loop";
|
|
271
|
-
readonly keyframable: false;
|
|
272
|
-
};
|
|
273
291
|
readonly freeze: {
|
|
274
292
|
readonly type: "number";
|
|
275
293
|
readonly default: null;
|
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -125,14 +125,13 @@ const resizePaintTarget = ({ target, width, height, }) => {
|
|
|
125
125
|
target.height = height;
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
const defaultOnPaint = ({ canvas,
|
|
128
|
+
const defaultOnPaint = ({ canvas, elementImage, }) => {
|
|
129
129
|
const ctx = canvas.getContext('2d');
|
|
130
130
|
if (!ctx) {
|
|
131
131
|
throw new Error('Failed to acquire 2D context for <HtmlInCanvas> canvas');
|
|
132
132
|
}
|
|
133
133
|
ctx.reset();
|
|
134
|
-
|
|
135
|
-
element.style.transform = transform.toString();
|
|
134
|
+
ctx.drawElementImage(elementImage, 0, 0);
|
|
136
135
|
};
|
|
137
136
|
/* eslint-enable react/require-default-props */
|
|
138
137
|
const HtmlInCanvasAncestorContext = (0, react_1.createContext)(false);
|
|
@@ -328,11 +327,14 @@ const HtmlInCanvasContent = (0, react_1.forwardRef)(({ width, height, effects, c
|
|
|
328
327
|
// Default paint handlers draw synchronously on the layout canvas itself.
|
|
329
328
|
// Custom handlers retain the transferred OffscreenCanvas API.
|
|
330
329
|
(0, react_1.useLayoutEffect)(() => {
|
|
330
|
+
var _a;
|
|
331
331
|
const placeholder = canvas2dRef.current;
|
|
332
332
|
if (!placeholder) {
|
|
333
333
|
throw new Error('Canvas not found');
|
|
334
334
|
}
|
|
335
|
+
placeholder.setAttribute('content', 'drawable');
|
|
335
336
|
placeholder.layoutSubtree = true;
|
|
337
|
+
(_a = divRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute('drawable', '');
|
|
336
338
|
const paintTarget = usesDirectLayoutCanvas
|
|
337
339
|
? placeholder
|
|
338
340
|
: getTransferredOffscreenCanvas(placeholder);
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -203,12 +203,6 @@ export declare const imgSchema: {
|
|
|
203
203
|
readonly step: 1;
|
|
204
204
|
readonly hiddenFromList: true;
|
|
205
205
|
};
|
|
206
|
-
readonly loop: {
|
|
207
|
-
readonly type: "boolean";
|
|
208
|
-
readonly default: false;
|
|
209
|
-
readonly description: "Loop";
|
|
210
|
-
readonly keyframable: false;
|
|
211
|
-
};
|
|
212
206
|
readonly freeze: {
|
|
213
207
|
readonly type: "number";
|
|
214
208
|
readonly default: null;
|
|
@@ -67,12 +67,6 @@ export declare const Interactive: {
|
|
|
67
67
|
readonly hiddenFromList: false;
|
|
68
68
|
readonly keyframable: false;
|
|
69
69
|
};
|
|
70
|
-
readonly loop: {
|
|
71
|
-
readonly type: "boolean";
|
|
72
|
-
readonly default: false;
|
|
73
|
-
readonly description: "Loop";
|
|
74
|
-
readonly keyframable: false;
|
|
75
|
-
};
|
|
76
70
|
readonly freeze: {
|
|
77
71
|
readonly type: "number";
|
|
78
72
|
readonly default: null;
|
|
@@ -410,12 +404,6 @@ export declare const Interactive: {
|
|
|
410
404
|
readonly hiddenFromList: false;
|
|
411
405
|
readonly keyframable: false;
|
|
412
406
|
};
|
|
413
|
-
readonly loop: {
|
|
414
|
-
readonly type: "boolean";
|
|
415
|
-
readonly default: false;
|
|
416
|
-
readonly description: "Loop";
|
|
417
|
-
readonly keyframable: false;
|
|
418
|
-
};
|
|
419
407
|
readonly freeze: {
|
|
420
408
|
readonly type: "number";
|
|
421
409
|
readonly default: null;
|
package/dist/cjs/Interactive.js
CHANGED
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.Interactive = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
|
+
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
39
40
|
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
40
41
|
const freeze_js_1 = require("./freeze.js");
|
|
41
42
|
const interactivity_schema_js_1 = require("./interactivity-schema.js");
|
|
@@ -123,6 +124,13 @@ const withSchema = (untypedOptions) => {
|
|
|
123
124
|
}
|
|
124
125
|
const { Component, componentName, schema, wrapInSequence: _, ...rest } = options;
|
|
125
126
|
const ComponentWrappedInSequence = (0, react_1.forwardRef)((props, ref) => {
|
|
127
|
+
const { canvasContent, compositions } = (0, react_1.useContext)(CompositionManagerContext_js_1.CompositionManager);
|
|
128
|
+
// The render callback runs after the exported wrapper has been initialized.
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
130
|
+
const componentIdentity = (0, enable_sequence_stack_traces_js_1.resolveComponentIdentity)(Wrapped);
|
|
131
|
+
const isCurrentComposition = compositions.some((composition) => (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' &&
|
|
132
|
+
composition.id === canvasContent.compositionId &&
|
|
133
|
+
composition.componentFromProps === componentIdentity);
|
|
126
134
|
const { durationInFrames, from, trimBefore, playbackRate, loop, freeze, hidden, name, showInTimeline, controls, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, ...componentProps } = props;
|
|
127
135
|
const { cropLeft, cropRight, cropTop, cropBottom, style, ...componentPropsWithoutCropping } = componentProps;
|
|
128
136
|
const { effectivePremountFor, effectivePostmountFor, freezeFrame, isPremountingOrPostmounting, premountingActive, postmountingActive, premountingStyle, } = (0, use_premounting_js_1.usePremounting)({
|
|
@@ -147,7 +155,7 @@ const withSchema = (untypedOptions) => {
|
|
|
147
155
|
style: premountingStyle,
|
|
148
156
|
componentName,
|
|
149
157
|
});
|
|
150
|
-
return (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freezeFrame, active: isPremountingOrPostmounting, children: jsx_runtime_1.jsx(Sequence_js_1.SequenceWithoutSchema, { layout: "none", durationInFrames: durationInFrames, from: from, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, hidden: hidden, name: name !== null && name !== void 0 ? name : componentName, showInTimeline: showInTimeline, controls: controls, _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, children: react_1.default.createElement(Component, {
|
|
158
|
+
return (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freezeFrame, active: isPremountingOrPostmounting, children: jsx_runtime_1.jsx(Sequence_js_1.SequenceWithoutSchema, { _remotionInternalSingleChildComponent: isCurrentComposition ? null : componentIdentity, layout: "none", durationInFrames: durationInFrames, from: from, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, hidden: hidden, name: name !== null && name !== void 0 ? name : componentName, showInTimeline: isCurrentComposition ? false : showInTimeline, controls: controls, _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, children: react_1.default.createElement(Component, {
|
|
151
159
|
...componentPropsWithoutCropping,
|
|
152
160
|
style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined,
|
|
153
161
|
ref,
|
|
@@ -199,12 +199,6 @@ export declare const animatedImageSchema: {
|
|
|
199
199
|
readonly hiddenFromList: false;
|
|
200
200
|
readonly keyframable: false;
|
|
201
201
|
};
|
|
202
|
-
readonly loop: {
|
|
203
|
-
readonly type: "boolean";
|
|
204
|
-
readonly default: false;
|
|
205
|
-
readonly description: "Loop";
|
|
206
|
-
readonly keyframable: false;
|
|
207
|
-
};
|
|
208
202
|
readonly freeze: {
|
|
209
203
|
readonly type: "number";
|
|
210
204
|
readonly default: null;
|
|
@@ -221,6 +215,12 @@ export declare const animatedImageSchema: {
|
|
|
221
215
|
readonly description: "Source";
|
|
222
216
|
readonly keyframable: false;
|
|
223
217
|
};
|
|
218
|
+
readonly loop: {
|
|
219
|
+
readonly type: "boolean";
|
|
220
|
+
readonly default: false;
|
|
221
|
+
readonly description: "Loop";
|
|
222
|
+
readonly keyframable: false;
|
|
223
|
+
};
|
|
224
224
|
};
|
|
225
225
|
export declare const AnimatedImage: React.ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractiveCropProps & import("../Interactive.js").InteractivePremountProps & {
|
|
226
226
|
src: string;
|
|
@@ -32,6 +32,7 @@ exports.animatedImageSchema = {
|
|
|
32
32
|
keyframable: false,
|
|
33
33
|
},
|
|
34
34
|
...interactivity_schema_js_1.baseSchema,
|
|
35
|
+
loop: interactivity_schema_js_1.loopField,
|
|
35
36
|
...interactivity_schema_js_1.cropSchema,
|
|
36
37
|
...interactivity_schema_js_1.premountSchema,
|
|
37
38
|
...interactivity_schema_js_1.transformSchema,
|
|
@@ -189,12 +189,6 @@ export declare const canvasImageSchema: {
|
|
|
189
189
|
readonly step: 1;
|
|
190
190
|
readonly hiddenFromList: true;
|
|
191
191
|
};
|
|
192
|
-
readonly loop: {
|
|
193
|
-
readonly type: "boolean";
|
|
194
|
-
readonly default: false;
|
|
195
|
-
readonly description: "Loop";
|
|
196
|
-
readonly keyframable: false;
|
|
197
|
-
};
|
|
198
192
|
readonly freeze: {
|
|
199
193
|
readonly type: "number";
|
|
200
194
|
readonly default: null;
|
|
@@ -211,12 +211,6 @@ export declare const solidSchema: {
|
|
|
211
211
|
readonly hiddenFromList: false;
|
|
212
212
|
readonly keyframable: false;
|
|
213
213
|
};
|
|
214
|
-
readonly loop: {
|
|
215
|
-
readonly type: "boolean";
|
|
216
|
-
readonly default: false;
|
|
217
|
-
readonly description: "Loop";
|
|
218
|
-
readonly keyframable: false;
|
|
219
|
-
};
|
|
220
214
|
readonly freeze: {
|
|
221
215
|
readonly type: "number";
|
|
222
216
|
readonly default: null;
|
|
@@ -805,12 +805,6 @@ export declare const baseSchema: {
|
|
|
805
805
|
readonly hiddenFromList: false;
|
|
806
806
|
readonly keyframable: false;
|
|
807
807
|
};
|
|
808
|
-
readonly loop: {
|
|
809
|
-
readonly type: "boolean";
|
|
810
|
-
readonly default: false;
|
|
811
|
-
readonly description: "Loop";
|
|
812
|
-
readonly keyframable: false;
|
|
813
|
-
};
|
|
814
808
|
readonly freeze: {
|
|
815
809
|
readonly type: "number";
|
|
816
810
|
readonly default: null;
|
|
@@ -842,12 +836,6 @@ export declare const baseSchemaWithoutPlaybackRate: {
|
|
|
842
836
|
readonly step: 1;
|
|
843
837
|
readonly hiddenFromList: true;
|
|
844
838
|
};
|
|
845
|
-
readonly loop: {
|
|
846
|
-
readonly type: "boolean";
|
|
847
|
-
readonly default: false;
|
|
848
|
-
readonly description: "Loop";
|
|
849
|
-
readonly keyframable: false;
|
|
850
|
-
};
|
|
851
839
|
readonly freeze: {
|
|
852
840
|
readonly type: "number";
|
|
853
841
|
readonly default: null;
|
|
@@ -888,12 +876,6 @@ export declare const sequenceSchema: {
|
|
|
888
876
|
readonly hiddenFromList: false;
|
|
889
877
|
readonly keyframable: false;
|
|
890
878
|
};
|
|
891
|
-
readonly loop: {
|
|
892
|
-
readonly type: "boolean";
|
|
893
|
-
readonly default: false;
|
|
894
|
-
readonly description: "Loop";
|
|
895
|
-
readonly keyframable: false;
|
|
896
|
-
};
|
|
897
879
|
readonly freeze: {
|
|
898
880
|
readonly type: "number";
|
|
899
881
|
readonly default: null;
|
|
@@ -1106,12 +1088,6 @@ export declare const baseSchemaWithoutFrom: {
|
|
|
1106
1088
|
readonly hiddenFromList: false;
|
|
1107
1089
|
readonly keyframable: false;
|
|
1108
1090
|
};
|
|
1109
|
-
readonly loop: {
|
|
1110
|
-
readonly type: "boolean";
|
|
1111
|
-
readonly default: false;
|
|
1112
|
-
readonly description: "Loop";
|
|
1113
|
-
readonly keyframable: false;
|
|
1114
|
-
};
|
|
1115
1091
|
readonly freeze: {
|
|
1116
1092
|
readonly type: "number";
|
|
1117
1093
|
readonly default: null;
|
|
@@ -1146,12 +1122,6 @@ export declare const sequenceSchemaWithoutFrom: {
|
|
|
1146
1122
|
readonly hiddenFromList: false;
|
|
1147
1123
|
readonly keyframable: false;
|
|
1148
1124
|
};
|
|
1149
|
-
readonly loop: {
|
|
1150
|
-
readonly type: "boolean";
|
|
1151
|
-
readonly default: false;
|
|
1152
|
-
readonly description: "Loop";
|
|
1153
|
-
readonly keyframable: false;
|
|
1154
|
-
};
|
|
1155
1125
|
readonly freeze: {
|
|
1156
1126
|
readonly type: "number";
|
|
1157
1127
|
readonly default: null;
|
|
@@ -380,7 +380,6 @@ exports.baseSchema = {
|
|
|
380
380
|
from: exports.fromField,
|
|
381
381
|
trimBefore: exports.trimBeforeField,
|
|
382
382
|
playbackRate: playbackRateField,
|
|
383
|
-
loop: exports.loopField,
|
|
384
383
|
freeze: exports.freezeField,
|
|
385
384
|
hidden: exports.hiddenField,
|
|
386
385
|
name: exports.sequenceNameField,
|
|
@@ -391,7 +390,6 @@ exports.baseSchemaWithoutPlaybackRate = {
|
|
|
391
390
|
durationInFrames: exports.durationInFramesField,
|
|
392
391
|
from: exports.fromField,
|
|
393
392
|
trimBefore: exports.trimBeforeField,
|
|
394
|
-
loop: exports.loopField,
|
|
395
393
|
freeze: exports.freezeField,
|
|
396
394
|
hidden: exports.hiddenField,
|
|
397
395
|
name: exports.sequenceNameField,
|
|
@@ -413,7 +411,6 @@ exports.baseSchemaWithoutFrom = {
|
|
|
413
411
|
durationInFrames: exports.durationInFramesField,
|
|
414
412
|
trimBefore: exports.trimBeforeField,
|
|
415
413
|
playbackRate: playbackRateField,
|
|
416
|
-
loop: exports.loopField,
|
|
417
414
|
freeze: exports.freezeField,
|
|
418
415
|
hidden: exports.hiddenField,
|
|
419
416
|
name: exports.sequenceNameField,
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -154,12 +154,6 @@ export declare const Internals: {
|
|
|
154
154
|
readonly hiddenFromList: false;
|
|
155
155
|
readonly keyframable: false;
|
|
156
156
|
};
|
|
157
|
-
readonly loop: {
|
|
158
|
-
readonly type: "boolean";
|
|
159
|
-
readonly default: false;
|
|
160
|
-
readonly description: "Loop";
|
|
161
|
-
readonly keyframable: false;
|
|
162
|
-
};
|
|
163
157
|
readonly freeze: {
|
|
164
158
|
readonly type: "number";
|
|
165
159
|
readonly default: null;
|
|
@@ -200,12 +194,6 @@ export declare const Internals: {
|
|
|
200
194
|
readonly hiddenFromList: false;
|
|
201
195
|
readonly keyframable: false;
|
|
202
196
|
};
|
|
203
|
-
readonly loop: {
|
|
204
|
-
readonly type: "boolean";
|
|
205
|
-
readonly default: false;
|
|
206
|
-
readonly description: "Loop";
|
|
207
|
-
readonly keyframable: false;
|
|
208
|
-
};
|
|
209
197
|
readonly freeze: {
|
|
210
198
|
readonly type: "number";
|
|
211
199
|
readonly default: null;
|
|
@@ -1060,6 +1048,8 @@ export declare const Internals: {
|
|
|
1060
1048
|
readonly useTimelineSetFrameWithoutSeek: () => (u: import("react").SetStateAction<Record<string, number>>) => void;
|
|
1061
1049
|
readonly isIosSafari: () => boolean;
|
|
1062
1050
|
readonly WATCH_REMOTION_STATIC_FILES: "remotion_staticFilesChanged";
|
|
1051
|
+
readonly REACT_REFRESH_STARTED_EVENT: "remotion-react-refresh-started";
|
|
1052
|
+
readonly REACT_REFRESH_FINISHED_EVENT: "remotion-react-refresh-finished";
|
|
1063
1053
|
readonly addSequenceStackTraces: (component: unknown) => void;
|
|
1064
1054
|
readonly useMediaStartsAt: () => number;
|
|
1065
1055
|
readonly BufferingProvider: import("react").FC<{
|
package/dist/cjs/internals.js
CHANGED
|
@@ -78,6 +78,7 @@ const portal_node_js_1 = require("./portal-node.js");
|
|
|
78
78
|
const prefetch_state_js_1 = require("./prefetch-state.js");
|
|
79
79
|
const prefetch_js_1 = require("./prefetch.js");
|
|
80
80
|
const PremountContext_js_1 = require("./PremountContext.js");
|
|
81
|
+
const react_refresh_event_js_1 = require("./react-refresh-event.js");
|
|
81
82
|
const register_root_js_1 = require("./register-root.js");
|
|
82
83
|
const remotion_environment_context_js_1 = require("./remotion-environment-context.js");
|
|
83
84
|
const RemotionRoot_js_1 = require("./RemotionRoot.js");
|
|
@@ -247,6 +248,8 @@ exports.Internals = {
|
|
|
247
248
|
useTimelineSetFrameWithoutSeek: timeline_position_state_js_1.useTimelineSetFrameWithoutSeek,
|
|
248
249
|
isIosSafari: video_fragment_js_1.isIosSafari,
|
|
249
250
|
WATCH_REMOTION_STATIC_FILES: watch_static_file_js_1.WATCH_REMOTION_STATIC_FILES,
|
|
251
|
+
REACT_REFRESH_STARTED_EVENT: react_refresh_event_js_1.REACT_REFRESH_STARTED_EVENT,
|
|
252
|
+
REACT_REFRESH_FINISHED_EVENT: react_refresh_event_js_1.REACT_REFRESH_FINISHED_EVENT,
|
|
250
253
|
addSequenceStackTraces: enable_sequence_stack_traces_js_1.addSequenceStackTraces,
|
|
251
254
|
useMediaStartsAt: use_audio_frame_js_1.useMediaStartsAt,
|
|
252
255
|
BufferingProvider: buffering_js_1.BufferingProvider,
|
package/dist/cjs/no-react.d.ts
CHANGED
|
@@ -92,12 +92,6 @@ export declare const NoReactInternals: {
|
|
|
92
92
|
readonly hiddenFromList: false;
|
|
93
93
|
readonly keyframable: false;
|
|
94
94
|
};
|
|
95
|
-
readonly loop: {
|
|
96
|
-
readonly type: "boolean";
|
|
97
|
-
readonly default: false;
|
|
98
|
-
readonly description: "Loop";
|
|
99
|
-
readonly keyframable: false;
|
|
100
|
-
};
|
|
101
95
|
readonly freeze: {
|
|
102
96
|
readonly type: "number";
|
|
103
97
|
readonly default: null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type TNonceContext = {
|
|
2
|
+
getNonce: () => number;
|
|
3
|
+
};
|
|
4
|
+
type NonceHistoryItem = [number, number];
|
|
5
|
+
export type NonceHistory = NonceHistoryItem[];
|
|
6
|
+
export type NonceHistoryContext = {
|
|
7
|
+
get: () => NonceHistory;
|
|
8
|
+
};
|
|
9
|
+
export declare const NonceContext: import("react").Context<TNonceContext>;
|
|
10
|
+
export declare const useNonce: () => NonceHistoryContext;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useNonce = exports.NonceContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.NonceContext = (0, react_1.createContext)({
|
|
6
|
+
getNonce: () => 0,
|
|
7
|
+
});
|
|
8
|
+
let fastRefreshNonce = 0;
|
|
9
|
+
try {
|
|
10
|
+
if (typeof __webpack_module__ !== 'undefined') {
|
|
11
|
+
if (__webpack_module__.hot) {
|
|
12
|
+
__webpack_module__.hot.addStatusHandler((status) => {
|
|
13
|
+
if (status === 'idle') {
|
|
14
|
+
fastRefreshNonce++;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch (_a) {
|
|
21
|
+
// __webpack_module__ may throw ReferenceError in some environments
|
|
22
|
+
}
|
|
23
|
+
const useNonce = () => {
|
|
24
|
+
const context = (0, react_1.useContext)(exports.NonceContext);
|
|
25
|
+
const nonce = context.getNonce();
|
|
26
|
+
const nonceRef = (0, react_1.useRef)(nonce);
|
|
27
|
+
nonceRef.current = nonce;
|
|
28
|
+
const history = (0, react_1.useRef)([[fastRefreshNonce, nonce]]);
|
|
29
|
+
const get = (0, react_1.useCallback)(() => {
|
|
30
|
+
if (fastRefreshNonce !== history.current[history.current.length - 1][0]) {
|
|
31
|
+
history.current = [
|
|
32
|
+
...history.current,
|
|
33
|
+
[fastRefreshNonce, nonceRef.current],
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
return history.current;
|
|
37
|
+
}, [history]);
|
|
38
|
+
return (0, react_1.useMemo)(() => {
|
|
39
|
+
return { get };
|
|
40
|
+
}, [get]);
|
|
41
|
+
};
|
|
42
|
+
exports.useNonce = useNonce;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REACT_REFRESH_FINISHED_EVENT = exports.REACT_REFRESH_STARTED_EVENT = void 0;
|
|
4
|
+
// Dispatched on `window` by the Fast Refresh integrations of the bundlers
|
|
5
|
+
// around `performReactRefresh()`, so editors can synchronize state with the
|
|
6
|
+
// refreshed tree.
|
|
7
|
+
exports.REACT_REFRESH_STARTED_EVENT = 'remotion-react-refresh-started';
|
|
8
|
+
exports.REACT_REFRESH_FINISHED_EVENT = 'remotion-react-refresh-finished';
|
package/dist/cjs/series/index.js
CHANGED
|
@@ -52,7 +52,6 @@ const seriesSequenceSchema = {
|
|
|
52
52
|
freeze: Interactive_js_1.Interactive.baseSchema.freeze,
|
|
53
53
|
trimBefore: Interactive_js_1.Interactive.sequenceSchema.trimBefore,
|
|
54
54
|
playbackRate: Interactive_js_1.Interactive.sequenceSchema.playbackRate,
|
|
55
|
-
loop: { type: 'hidden' },
|
|
56
55
|
layout: Interactive_js_1.Interactive.sequenceSchema.layout,
|
|
57
56
|
};
|
|
58
57
|
const SeriesSequenceInner = (0, react_1.forwardRef)(({ offset = 0, className = '', _remotionInternalRender = null, ...props }, ref) => {
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -1561,7 +1561,7 @@ var Composition = (props) => {
|
|
|
1561
1561
|
};
|
|
1562
1562
|
|
|
1563
1563
|
// src/version.ts
|
|
1564
|
-
var VERSION = "4.0.
|
|
1564
|
+
var VERSION = "4.0.532";
|
|
1565
1565
|
|
|
1566
1566
|
// src/multiple-versions-warning.ts
|
|
1567
1567
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -2431,7 +2431,6 @@ var baseSchema = {
|
|
|
2431
2431
|
from: fromField,
|
|
2432
2432
|
trimBefore: trimBeforeField,
|
|
2433
2433
|
playbackRate: playbackRateField,
|
|
2434
|
-
loop: loopField,
|
|
2435
2434
|
freeze: freezeField,
|
|
2436
2435
|
hidden: hiddenField,
|
|
2437
2436
|
name: sequenceNameField,
|
|
@@ -2441,7 +2440,6 @@ var baseSchemaWithoutPlaybackRate = {
|
|
|
2441
2440
|
durationInFrames: durationInFramesField,
|
|
2442
2441
|
from: fromField,
|
|
2443
2442
|
trimBefore: trimBeforeField,
|
|
2444
|
-
loop: loopField,
|
|
2445
2443
|
freeze: freezeField,
|
|
2446
2444
|
hidden: hiddenField,
|
|
2447
2445
|
name: sequenceNameField,
|
|
@@ -2463,7 +2461,6 @@ var baseSchemaWithoutFrom = {
|
|
|
2463
2461
|
durationInFrames: durationInFramesField,
|
|
2464
2462
|
trimBefore: trimBeforeField,
|
|
2465
2463
|
playbackRate: playbackRateField,
|
|
2466
|
-
loop: loopField,
|
|
2467
2464
|
freeze: freezeField,
|
|
2468
2465
|
hidden: hiddenField,
|
|
2469
2466
|
name: sequenceNameField,
|
|
@@ -7032,6 +7029,7 @@ var animatedImageSchema = {
|
|
|
7032
7029
|
keyframable: false
|
|
7033
7030
|
},
|
|
7034
7031
|
...baseSchema,
|
|
7032
|
+
loop: loopField,
|
|
7035
7033
|
...cropSchema,
|
|
7036
7034
|
...premountSchema,
|
|
7037
7035
|
...transformSchema,
|
|
@@ -11291,7 +11289,6 @@ var resizePaintTarget = ({
|
|
|
11291
11289
|
};
|
|
11292
11290
|
var defaultOnPaint = ({
|
|
11293
11291
|
canvas,
|
|
11294
|
-
element,
|
|
11295
11292
|
elementImage
|
|
11296
11293
|
}) => {
|
|
11297
11294
|
const ctx = canvas.getContext("2d");
|
|
@@ -11299,8 +11296,7 @@ var defaultOnPaint = ({
|
|
|
11299
11296
|
throw new Error("Failed to acquire 2D context for <HtmlInCanvas> canvas");
|
|
11300
11297
|
}
|
|
11301
11298
|
ctx.reset();
|
|
11302
|
-
|
|
11303
|
-
element.style.transform = transform.toString();
|
|
11299
|
+
ctx.drawElementImage(elementImage, 0, 0);
|
|
11304
11300
|
};
|
|
11305
11301
|
var HtmlInCanvasAncestorContext = createContext28(false);
|
|
11306
11302
|
var HtmlInCanvasContent = forwardRef9(({
|
|
@@ -11487,7 +11483,9 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
11487
11483
|
if (!placeholder) {
|
|
11488
11484
|
throw new Error("Canvas not found");
|
|
11489
11485
|
}
|
|
11486
|
+
placeholder.setAttribute("content", "drawable");
|
|
11490
11487
|
placeholder.layoutSubtree = true;
|
|
11488
|
+
divRef.current?.setAttribute("drawable", "");
|
|
11491
11489
|
const paintTarget = usesDirectLayoutCanvas ? placeholder : getTransferredOffscreenCanvas(placeholder);
|
|
11492
11490
|
paintTargetRef.current = paintTarget;
|
|
11493
11491
|
resizePaintTarget({
|
|
@@ -12688,7 +12686,7 @@ var Img = withInteractivitySchema({
|
|
|
12688
12686
|
});
|
|
12689
12687
|
addSequenceStackTraces(Img);
|
|
12690
12688
|
// src/Interactive.tsx
|
|
12691
|
-
import React35, { forwardRef as forwardRef12, useCallback as useCallback22 } from "react";
|
|
12689
|
+
import React35, { forwardRef as forwardRef12, useCallback as useCallback22, useContext as useContext40 } from "react";
|
|
12692
12690
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
12693
12691
|
var sourcePathToIdentityPrefix = (packageName) => {
|
|
12694
12692
|
if (packageName === "remotion") {
|
|
@@ -12775,6 +12773,9 @@ var withSchema = (untypedOptions) => {
|
|
|
12775
12773
|
...rest
|
|
12776
12774
|
} = options;
|
|
12777
12775
|
const ComponentWrappedInSequence = forwardRef12((props2, ref) => {
|
|
12776
|
+
const { canvasContent, compositions } = useContext40(CompositionManager);
|
|
12777
|
+
const componentIdentity = resolveComponentIdentity(Wrapped);
|
|
12778
|
+
const isCurrentComposition = compositions.some((composition) => canvasContent?.type === "composition" && composition.id === canvasContent.compositionId && composition.componentFromProps === componentIdentity);
|
|
12778
12779
|
const {
|
|
12779
12780
|
durationInFrames,
|
|
12780
12781
|
from,
|
|
@@ -12834,6 +12835,7 @@ var withSchema = (untypedOptions) => {
|
|
|
12834
12835
|
frame: freezeFrame,
|
|
12835
12836
|
active: isPremountingOrPostmounting,
|
|
12836
12837
|
children: /* @__PURE__ */ jsx31(SequenceWithoutSchema, {
|
|
12838
|
+
_remotionInternalSingleChildComponent: isCurrentComposition ? null : componentIdentity,
|
|
12837
12839
|
layout: "none",
|
|
12838
12840
|
durationInFrames,
|
|
12839
12841
|
from,
|
|
@@ -12843,7 +12845,7 @@ var withSchema = (untypedOptions) => {
|
|
|
12843
12845
|
freeze,
|
|
12844
12846
|
hidden,
|
|
12845
12847
|
name: name ?? componentName,
|
|
12846
|
-
showInTimeline,
|
|
12848
|
+
showInTimeline: isCurrentComposition ? false : showInTimeline,
|
|
12847
12849
|
controls,
|
|
12848
12850
|
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
12849
12851
|
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
@@ -13439,6 +13441,10 @@ var getMediabunnyInputResourceKey = ({
|
|
|
13439
13441
|
var MEDIABUNNY_DURATION_VALUE_KEY = "mediabunny-duration";
|
|
13440
13442
|
var globalMediaResourceManager = makeMediaResourceManager();
|
|
13441
13443
|
|
|
13444
|
+
// src/react-refresh-event.ts
|
|
13445
|
+
var REACT_REFRESH_STARTED_EVENT = "remotion-react-refresh-started";
|
|
13446
|
+
var REACT_REFRESH_FINISHED_EVENT = "remotion-react-refresh-finished";
|
|
13447
|
+
|
|
13442
13448
|
// src/register-root.ts
|
|
13443
13449
|
var Root = null;
|
|
13444
13450
|
var listeners = [];
|
|
@@ -13783,7 +13789,7 @@ var setupEnvVariables = () => {
|
|
|
13783
13789
|
};
|
|
13784
13790
|
|
|
13785
13791
|
// src/use-pixel-density.ts
|
|
13786
|
-
import React41, { useContext as
|
|
13792
|
+
import React41, { useContext as useContext41 } from "react";
|
|
13787
13793
|
var PixelDensityContext = React41.createContext(null);
|
|
13788
13794
|
var getBrowserPixelDensity = () => {
|
|
13789
13795
|
if (typeof window === "undefined") {
|
|
@@ -13792,8 +13798,8 @@ var getBrowserPixelDensity = () => {
|
|
|
13792
13798
|
return window.devicePixelRatio || 1;
|
|
13793
13799
|
};
|
|
13794
13800
|
var usePixelDensity = (options) => {
|
|
13795
|
-
const pixelDensity =
|
|
13796
|
-
const canUseRemotionHooks =
|
|
13801
|
+
const pixelDensity = useContext41(PixelDensityContext);
|
|
13802
|
+
const canUseRemotionHooks = useContext41(CanUseRemotionHooks);
|
|
13797
13803
|
if (pixelDensity !== null) {
|
|
13798
13804
|
return pixelDensity;
|
|
13799
13805
|
}
|
|
@@ -13815,7 +13821,7 @@ import { useCallback as useCallback26 } from "react";
|
|
|
13815
13821
|
// src/video/OffthreadVideoForRendering.tsx
|
|
13816
13822
|
import {
|
|
13817
13823
|
useCallback as useCallback24,
|
|
13818
|
-
useContext as
|
|
13824
|
+
useContext as useContext42,
|
|
13819
13825
|
useEffect as useEffect18,
|
|
13820
13826
|
useLayoutEffect as useLayoutEffect16,
|
|
13821
13827
|
useMemo as useMemo37,
|
|
@@ -13858,10 +13864,10 @@ var OffthreadVideoForRendering = ({
|
|
|
13858
13864
|
const frame = useCurrentFrame();
|
|
13859
13865
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
13860
13866
|
const videoConfig = useUnsafeVideoConfig();
|
|
13861
|
-
const sequenceContext =
|
|
13867
|
+
const sequenceContext = useContext42(SequenceContext);
|
|
13862
13868
|
const sequencePlaybackRate = sequenceContext?.playbackRate ?? 1;
|
|
13863
|
-
const audioStartFrame =
|
|
13864
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
13869
|
+
const audioStartFrame = useContext42(Html5MediaTrimContext);
|
|
13870
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext42(RenderAssetManager);
|
|
13865
13871
|
if (!src) {
|
|
13866
13872
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
13867
13873
|
}
|
|
@@ -14043,7 +14049,7 @@ var OffthreadVideoForRendering = ({
|
|
|
14043
14049
|
import React43, {
|
|
14044
14050
|
forwardRef as forwardRef13,
|
|
14045
14051
|
useCallback as useCallback25,
|
|
14046
|
-
useContext as
|
|
14052
|
+
useContext as useContext43,
|
|
14047
14053
|
useEffect as useEffect20,
|
|
14048
14054
|
useImperativeHandle as useImperativeHandle9,
|
|
14049
14055
|
useMemo as useMemo38,
|
|
@@ -14099,7 +14105,7 @@ class MediaPlaybackError extends Error {
|
|
|
14099
14105
|
// src/video/VideoForPreview.tsx
|
|
14100
14106
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
14101
14107
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
14102
|
-
const context =
|
|
14108
|
+
const context = useContext43(SharedAudioContext);
|
|
14103
14109
|
if (!context) {
|
|
14104
14110
|
throw new Error("SharedAudioContext not found");
|
|
14105
14111
|
}
|
|
@@ -14156,7 +14162,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14156
14162
|
}
|
|
14157
14163
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
14158
14164
|
const { fps, durationInFrames } = useVideoConfig();
|
|
14159
|
-
const parentSequence =
|
|
14165
|
+
const parentSequence = useContext43(SequenceContext);
|
|
14160
14166
|
const { isStudio } = useRemotionEnvironment();
|
|
14161
14167
|
const logLevel = useLogLevel();
|
|
14162
14168
|
const mountTime = useMountTime();
|
|
@@ -14765,6 +14771,8 @@ var Internals = {
|
|
|
14765
14771
|
useTimelineSetFrameWithoutSeek,
|
|
14766
14772
|
isIosSafari,
|
|
14767
14773
|
WATCH_REMOTION_STATIC_FILES,
|
|
14774
|
+
REACT_REFRESH_STARTED_EVENT,
|
|
14775
|
+
REACT_REFRESH_FINISHED_EVENT,
|
|
14768
14776
|
addSequenceStackTraces,
|
|
14769
14777
|
useMediaStartsAt,
|
|
14770
14778
|
BufferingProvider,
|
|
@@ -14871,7 +14879,6 @@ var seriesSequenceSchema = {
|
|
|
14871
14879
|
freeze: Interactive.baseSchema.freeze,
|
|
14872
14880
|
trimBefore: Interactive.sequenceSchema.trimBefore,
|
|
14873
14881
|
playbackRate: Interactive.sequenceSchema.playbackRate,
|
|
14874
|
-
loop: { type: "hidden" },
|
|
14875
14882
|
layout: Interactive.sequenceSchema.layout
|
|
14876
14883
|
};
|
|
14877
14884
|
var SeriesSequenceInner = forwardRef14(({ offset = 0, className = "", _remotionInternalRender = null, ...props2 }, ref) => {
|
|
@@ -15115,12 +15122,12 @@ var Still = (props2) => {
|
|
|
15115
15122
|
};
|
|
15116
15123
|
addSequenceStackTraces(Still);
|
|
15117
15124
|
// src/video/html5-video.tsx
|
|
15118
|
-
import { forwardRef as forwardRef16, useCallback as useCallback27, useContext as
|
|
15125
|
+
import { forwardRef as forwardRef16, useCallback as useCallback27, useContext as useContext45 } from "react";
|
|
15119
15126
|
|
|
15120
15127
|
// src/video/VideoForRendering.tsx
|
|
15121
15128
|
import {
|
|
15122
15129
|
forwardRef as forwardRef15,
|
|
15123
|
-
useContext as
|
|
15130
|
+
useContext as useContext44,
|
|
15124
15131
|
useEffect as useEffect21,
|
|
15125
15132
|
useImperativeHandle as useImperativeHandle10,
|
|
15126
15133
|
useLayoutEffect as useLayoutEffect17,
|
|
@@ -15276,14 +15283,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
15276
15283
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15277
15284
|
const videoConfig = useUnsafeVideoConfig();
|
|
15278
15285
|
const videoRef = useRef28(null);
|
|
15279
|
-
const sequenceContext =
|
|
15286
|
+
const sequenceContext = useContext44(SequenceContext);
|
|
15280
15287
|
const sequencePlaybackRate = sequenceContext?.playbackRate ?? 1;
|
|
15281
|
-
const audioStartFrame =
|
|
15288
|
+
const audioStartFrame = useContext44(Html5MediaTrimContext);
|
|
15282
15289
|
const environment = useRemotionEnvironment();
|
|
15283
15290
|
const logLevel = useLogLevel();
|
|
15284
15291
|
const mountTime = useMountTime();
|
|
15285
15292
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
15286
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
15293
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext44(RenderAssetManager);
|
|
15287
15294
|
const id = useMemo41(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
15288
15295
|
props2.src,
|
|
15289
15296
|
sequenceContext?.cumulatedFrom,
|
|
@@ -15501,7 +15508,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
15501
15508
|
if (environment.isClientSideRendering) {
|
|
15502
15509
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
15503
15510
|
}
|
|
15504
|
-
const { durations, setDurations } =
|
|
15511
|
+
const { durations, setDurations } = useContext45(DurationsContext);
|
|
15505
15512
|
if (typeof ref === "string") {
|
|
15506
15513
|
throw new Error("string refs are not supported");
|
|
15507
15514
|
}
|
package/dist/esm/no-react.mjs
CHANGED
|
@@ -1764,12 +1764,6 @@ var trimBeforeField = {
|
|
|
1764
1764
|
step: 1,
|
|
1765
1765
|
hiddenFromList: true
|
|
1766
1766
|
};
|
|
1767
|
-
var loopField = {
|
|
1768
|
-
type: "boolean",
|
|
1769
|
-
default: false,
|
|
1770
|
-
description: "Loop",
|
|
1771
|
-
keyframable: false
|
|
1772
|
-
};
|
|
1773
1767
|
var freezeField = {
|
|
1774
1768
|
type: "number",
|
|
1775
1769
|
default: null,
|
|
@@ -1790,7 +1784,6 @@ var baseSchema = {
|
|
|
1790
1784
|
from: fromField,
|
|
1791
1785
|
trimBefore: trimBeforeField,
|
|
1792
1786
|
playbackRate: playbackRateField,
|
|
1793
|
-
loop: loopField,
|
|
1794
1787
|
freeze: freezeField,
|
|
1795
1788
|
hidden: hiddenField,
|
|
1796
1789
|
name: sequenceNameField,
|
|
@@ -1812,7 +1805,6 @@ var baseSchemaWithoutFrom = {
|
|
|
1812
1805
|
durationInFrames: durationInFramesField,
|
|
1813
1806
|
trimBefore: trimBeforeField,
|
|
1814
1807
|
playbackRate: playbackRateField,
|
|
1815
|
-
loop: loopField,
|
|
1816
1808
|
freeze: freezeField,
|
|
1817
1809
|
hidden: hiddenField,
|
|
1818
1810
|
name: sequenceNameField,
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
|
|
4
4
|
},
|
|
5
5
|
"name": "remotion",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.532",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "19.2.3",
|
|
36
36
|
"webpack": "5.105.0",
|
|
37
37
|
"zod": "4.5.4",
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
38
|
+
"@remotion/eslint-config-internal": "4.0.532",
|
|
39
39
|
"eslint": "9.19.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
41
41
|
},
|