remotion 4.0.533 → 4.0.534
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 +4 -0
- package/dist/cjs/CompositionManagerProvider.js +6 -9
- package/dist/cjs/HtmlInCanvas.js +2 -1
- package/dist/cjs/Sequence.d.ts +5 -0
- package/dist/cjs/Sequence.js +44 -11
- package/dist/cjs/SequenceManager.d.ts +9 -7
- package/dist/cjs/SequenceManager.js +24 -4
- package/dist/cjs/Track.d.ts +6 -0
- package/dist/cjs/Track.js +32 -0
- package/dist/cjs/animated-image/AnimatedImage.js +2 -1
- package/dist/cjs/canvas-image/CanvasImage.js +2 -1
- package/dist/cjs/effects/Solid.js +4 -3
- package/dist/cjs/effects/use-memoized-effects.d.ts +3 -1
- package/dist/cjs/effects/use-memoized-effects.js +8 -4
- package/dist/cjs/evaluate-source-expressions.d.ts +5 -0
- package/dist/cjs/evaluate-source-expressions.js +98 -0
- package/dist/cjs/freeze.js +6 -8
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/internals.d.ts +10 -3
- package/dist/cjs/internals.js +8 -0
- package/dist/cjs/no-react.d.ts +2 -0
- package/dist/cjs/no-react.js +3 -0
- package/dist/cjs/series/index.js +3 -1
- package/dist/cjs/timeline-track-context.d.ts +9 -0
- package/dist/cjs/timeline-track-context.js +6 -0
- package/dist/cjs/use-media-in-timeline.js +14 -2
- package/dist/cjs/use-schema.d.ts +32 -18
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/html5-video.js +1 -1
- package/dist/cjs/with-interactivity-schema.js +8 -2
- package/dist/cjs/wrap-remotion-context.d.ts +2 -0
- package/dist/cjs/wrap-remotion-context.js +8 -1
- package/dist/esm/index.mjs +404 -205
- package/dist/esm/no-react.mjs +78 -0
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
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.534";
|
|
1565
1565
|
|
|
1566
1566
|
// src/multiple-versions-warning.ts
|
|
1567
1567
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -1599,10 +1599,11 @@ var Null = () => {
|
|
|
1599
1599
|
|
|
1600
1600
|
// src/Sequence.tsx
|
|
1601
1601
|
import {
|
|
1602
|
-
createContext as
|
|
1602
|
+
createContext as createContext21,
|
|
1603
1603
|
forwardRef as forwardRef3,
|
|
1604
1604
|
useCallback as useCallback6,
|
|
1605
1605
|
useContext as useContext21,
|
|
1606
|
+
useLayoutEffect as useLayoutEffect5,
|
|
1606
1607
|
useMemo as useMemo14,
|
|
1607
1608
|
useRef as useRef7,
|
|
1608
1609
|
useState as useState6
|
|
@@ -2002,12 +2003,10 @@ var Freeze = ({
|
|
|
2002
2003
|
const isInsideNonPremountFreeze = useIsInsideNonPremountFreeze();
|
|
2003
2004
|
const relativeFrom = sequenceContext?.relativeFrom ?? 0;
|
|
2004
2005
|
const playbackRate = sequenceContext?.playbackRate ?? 1;
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2007
|
-
return timelineContext;
|
|
2008
|
-
}
|
|
2006
|
+
const { audioAndVideoTags } = timelineContext;
|
|
2007
|
+
const frozenTimelineValue = useMemo10(() => {
|
|
2009
2008
|
return {
|
|
2010
|
-
|
|
2009
|
+
audioAndVideoTags,
|
|
2011
2010
|
isPlaying: () => false,
|
|
2012
2011
|
isInsideFreeze: true,
|
|
2013
2012
|
frame: {
|
|
@@ -2015,8 +2014,7 @@ var Freeze = ({
|
|
|
2015
2014
|
}
|
|
2016
2015
|
};
|
|
2017
2016
|
}, [
|
|
2018
|
-
|
|
2019
|
-
timelineContext,
|
|
2017
|
+
audioAndVideoTags,
|
|
2020
2018
|
videoConfig.id,
|
|
2021
2019
|
frameToFreeze,
|
|
2022
2020
|
relativeFrom,
|
|
@@ -2037,7 +2035,7 @@ var Freeze = ({
|
|
|
2037
2035
|
return /* @__PURE__ */ jsx9(NonPremountFreezeContext.Provider, {
|
|
2038
2036
|
value: isInsideNonPremountFreeze || Boolean(isActive) && !_remotionInternalIsPremounting,
|
|
2039
2037
|
children: /* @__PURE__ */ jsx9(TimelineContext.Provider, {
|
|
2040
|
-
value:
|
|
2038
|
+
value: isActive ? frozenTimelineValue : timelineContext,
|
|
2041
2039
|
children: /* @__PURE__ */ jsx9(SequenceContext.Provider, {
|
|
2042
2040
|
value: newSequenceContext,
|
|
2043
2041
|
children
|
|
@@ -3011,11 +3009,27 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
3011
3009
|
if (index === -1) {
|
|
3012
3010
|
return seqs;
|
|
3013
3011
|
}
|
|
3012
|
+
const previousSequence = seqs[index];
|
|
3013
|
+
const timelineOrder = committedOrderRef.current?.get(seq.id) ?? null;
|
|
3014
|
+
let unchanged = Object.is(previousSequence.timelineOrder, timelineOrder);
|
|
3015
|
+
let keyCount = 1;
|
|
3016
|
+
if (unchanged) {
|
|
3017
|
+
for (const key in seq) {
|
|
3018
|
+
if (key === "timelineOrder" || !Object.prototype.hasOwnProperty.call(seq, key)) {
|
|
3019
|
+
continue;
|
|
3020
|
+
}
|
|
3021
|
+
keyCount++;
|
|
3022
|
+
if (!Object.prototype.hasOwnProperty.call(previousSequence, key) || !Object.is(previousSequence[key], seq[key])) {
|
|
3023
|
+
unchanged = false;
|
|
3024
|
+
break;
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
if (unchanged && Object.keys(previousSequence).length === keyCount) {
|
|
3029
|
+
return seqs;
|
|
3030
|
+
}
|
|
3014
3031
|
const next = [...seqs];
|
|
3015
|
-
next[index] = {
|
|
3016
|
-
...seq,
|
|
3017
|
-
timelineOrder: committedOrderRef.current?.get(seq.id) ?? null
|
|
3018
|
-
};
|
|
3032
|
+
next[index] = { ...seq, timelineOrder };
|
|
3019
3033
|
return next;
|
|
3020
3034
|
});
|
|
3021
3035
|
}, []);
|
|
@@ -3131,12 +3145,17 @@ var useRequireToBeInsideSeries = () => {
|
|
|
3131
3145
|
}
|
|
3132
3146
|
};
|
|
3133
3147
|
|
|
3148
|
+
// src/timeline-track-context.ts
|
|
3149
|
+
import { createContext as createContext17 } from "react";
|
|
3150
|
+
var TimelineTrackContext = createContext17(null);
|
|
3151
|
+
var ExperimentalTracksEnabledContext = createContext17(false);
|
|
3152
|
+
|
|
3134
3153
|
// src/use-premounting.ts
|
|
3135
3154
|
import { useContext as useContext17, useMemo as useMemo12 } from "react";
|
|
3136
3155
|
|
|
3137
3156
|
// src/PremountContext.tsx
|
|
3138
|
-
import { createContext as
|
|
3139
|
-
var PremountContext =
|
|
3157
|
+
import { createContext as createContext18 } from "react";
|
|
3158
|
+
var PremountContext = createContext18({
|
|
3140
3159
|
premountFramesRemaining: 0
|
|
3141
3160
|
});
|
|
3142
3161
|
|
|
@@ -3245,7 +3264,7 @@ var useSequenceRegistration = ({
|
|
|
3245
3264
|
|
|
3246
3265
|
// src/with-interactivity-schema.ts
|
|
3247
3266
|
import React18, {
|
|
3248
|
-
createContext as
|
|
3267
|
+
createContext as createContext20,
|
|
3249
3268
|
forwardRef as forwardRef2,
|
|
3250
3269
|
useContext as useContext20,
|
|
3251
3270
|
useLayoutEffect as useLayoutEffect4,
|
|
@@ -3289,6 +3308,82 @@ var deleteNestedKey = (obj, keysToRemove) => {
|
|
|
3289
3308
|
// src/effects/use-memoized-effects.ts
|
|
3290
3309
|
import { useContext as useContext19, useLayoutEffect as useLayoutEffect3, useRef as useRef6 } from "react";
|
|
3291
3310
|
|
|
3311
|
+
// src/evaluate-source-expressions.ts
|
|
3312
|
+
var evaluateSourceNumericValue = (expression, config) => {
|
|
3313
|
+
if (typeof expression === "number") {
|
|
3314
|
+
return expression;
|
|
3315
|
+
}
|
|
3316
|
+
if (expression.type === "literal") {
|
|
3317
|
+
return expression.value;
|
|
3318
|
+
}
|
|
3319
|
+
if (expression.type === "binary") {
|
|
3320
|
+
const left = evaluateSourceNumericValue(expression.left, config);
|
|
3321
|
+
const right = evaluateSourceNumericValue(expression.right, config);
|
|
3322
|
+
switch (expression.operator) {
|
|
3323
|
+
case "+":
|
|
3324
|
+
return left + right;
|
|
3325
|
+
case "-":
|
|
3326
|
+
return left - right;
|
|
3327
|
+
case "*":
|
|
3328
|
+
return left * right;
|
|
3329
|
+
case "/":
|
|
3330
|
+
return left / right;
|
|
3331
|
+
default:
|
|
3332
|
+
throw new Error("Unknown source expression operator");
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
const value = expression.binding.type === "constant" ? expression.binding.value : config?.[expression.binding.field] ?? NaN;
|
|
3336
|
+
if (expression.type === "video-config-multiplication") {
|
|
3337
|
+
return value * expression.multiplier;
|
|
3338
|
+
}
|
|
3339
|
+
if (expression.type === "video-config-subtraction") {
|
|
3340
|
+
return value - expression.subtrahend;
|
|
3341
|
+
}
|
|
3342
|
+
return value;
|
|
3343
|
+
};
|
|
3344
|
+
var evaluatedProps = new WeakMap;
|
|
3345
|
+
var evaluateSourcePropStatuses = (props, config) => {
|
|
3346
|
+
const configKey = config === null ? "" : `${config.durationInFrames}:${config.fps}:${config.width}:${config.height}`;
|
|
3347
|
+
const cached = evaluatedProps.get(props) ?? new Map;
|
|
3348
|
+
const existing = cached.get(configKey);
|
|
3349
|
+
if (existing)
|
|
3350
|
+
return existing;
|
|
3351
|
+
const result = Object.fromEntries(Object.entries(props).map(([key, status]) => {
|
|
3352
|
+
if (status.status === "computed") {
|
|
3353
|
+
return [key, status];
|
|
3354
|
+
}
|
|
3355
|
+
const adjustment = status.keyframeDisplayOffsetAdjustment === null ? null : evaluateSourceNumericValue(status.keyframeDisplayOffsetAdjustment, config);
|
|
3356
|
+
const rate = evaluateSourceNumericValue(status.keyframePlaybackRateAdjustment ?? 1, config);
|
|
3357
|
+
if (adjustment !== null && !Number.isFinite(adjustment) || !Number.isFinite(rate) || rate <= 0) {
|
|
3358
|
+
return [key, { status: "computed" }];
|
|
3359
|
+
}
|
|
3360
|
+
const timing = {
|
|
3361
|
+
keyframeDisplayOffsetAdjustment: adjustment,
|
|
3362
|
+
...status.keyframePlaybackRateAdjustment === undefined ? {} : { keyframePlaybackRateAdjustment: rate }
|
|
3363
|
+
};
|
|
3364
|
+
if (status.status === "static") {
|
|
3365
|
+
const value = status.numericExpression === undefined ? status.codeValue : evaluateSourceNumericValue(status.numericExpression, config);
|
|
3366
|
+
return [
|
|
3367
|
+
key,
|
|
3368
|
+
status.numericExpression !== undefined && !Number.isFinite(value) ? { status: "computed" } : { ...status, ...timing, codeValue: value }
|
|
3369
|
+
];
|
|
3370
|
+
}
|
|
3371
|
+
const keyframes = status.keyframes.map((keyframe) => ({
|
|
3372
|
+
...keyframe,
|
|
3373
|
+
frame: evaluateSourceNumericValue(keyframe.frame, config)
|
|
3374
|
+
}));
|
|
3375
|
+
if (keyframes.some((keyframe, index) => !Number.isFinite(keyframe.frame) || index > 0 && keyframe.frame <= keyframes[index - 1].frame)) {
|
|
3376
|
+
return [key, { status: "computed" }];
|
|
3377
|
+
}
|
|
3378
|
+
return [key, { ...status, ...timing, keyframes }];
|
|
3379
|
+
}));
|
|
3380
|
+
cached.set(configKey, result);
|
|
3381
|
+
if (cached.size > 8)
|
|
3382
|
+
cached.delete(cached.keys().next().value);
|
|
3383
|
+
evaluatedProps.set(props, cached);
|
|
3384
|
+
return result;
|
|
3385
|
+
};
|
|
3386
|
+
|
|
3292
3387
|
// src/bezier.ts
|
|
3293
3388
|
var NEWTON_ITERATIONS = 4;
|
|
3294
3389
|
var NEWTON_MIN_SLOPE = 0.001;
|
|
@@ -5272,11 +5367,11 @@ var getEffectiveVisualModeValue = ({
|
|
|
5272
5367
|
};
|
|
5273
5368
|
|
|
5274
5369
|
// src/sequence-node-path.tsx
|
|
5275
|
-
import { createContext as
|
|
5276
|
-
var OverrideIdsToNodePathsGettersContext =
|
|
5370
|
+
import { createContext as createContext19 } from "react";
|
|
5371
|
+
var OverrideIdsToNodePathsGettersContext = createContext19({
|
|
5277
5372
|
overrideIdToNodePathMappings: {}
|
|
5278
5373
|
});
|
|
5279
|
-
var OverrideIdsToNodePathsSettersContext =
|
|
5374
|
+
var OverrideIdsToNodePathsSettersContext = createContext19({
|
|
5280
5375
|
setOverrideIdToNodePath: () => {
|
|
5281
5376
|
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
5282
5377
|
}
|
|
@@ -5382,7 +5477,10 @@ var getEffectPropStatusesCtx = ({
|
|
|
5382
5477
|
if (!effect.canUpdate) {
|
|
5383
5478
|
return { type: "cannot-update-effect", reason: effect.reason };
|
|
5384
5479
|
}
|
|
5385
|
-
return {
|
|
5480
|
+
return {
|
|
5481
|
+
type: "can-update-effect",
|
|
5482
|
+
props: evaluateSourcePropStatuses(effect.props, nodePath.videoConfigValues)
|
|
5483
|
+
};
|
|
5386
5484
|
};
|
|
5387
5485
|
var getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
5388
5486
|
const status = propStatuses[makeSequencePropsSubscriptionKey(nodePath)];
|
|
@@ -5392,11 +5490,12 @@ var getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
|
5392
5490
|
if (!status.canUpdate) {
|
|
5393
5491
|
return;
|
|
5394
5492
|
}
|
|
5395
|
-
return status.props;
|
|
5493
|
+
return evaluateSourcePropStatuses(status.props, nodePath.videoConfigValues);
|
|
5396
5494
|
};
|
|
5397
5495
|
var useMemoizedEffects = ({
|
|
5398
5496
|
effects,
|
|
5399
|
-
overrideId
|
|
5497
|
+
overrideId,
|
|
5498
|
+
videoConfigValues
|
|
5400
5499
|
}) => {
|
|
5401
5500
|
const previousRef = useRef6(null);
|
|
5402
5501
|
const { propStatuses } = useContext19(VisualModePropStatusesContext);
|
|
@@ -5415,7 +5514,7 @@ var useMemoizedEffects = ({
|
|
|
5415
5514
|
}
|
|
5416
5515
|
const effectStatus = getEffectPropStatusesCtx({
|
|
5417
5516
|
propStatuses,
|
|
5418
|
-
nodePath,
|
|
5517
|
+
nodePath: { ...nodePath, videoConfigValues },
|
|
5419
5518
|
effectIndex: index
|
|
5420
5519
|
});
|
|
5421
5520
|
const propStatusOverrides = effectStatus.type === "can-update-effect" ? resolvePropStatusOverrides(effectStatus.props, frame) : null;
|
|
@@ -5739,12 +5838,11 @@ var mergeValues = ({
|
|
|
5739
5838
|
deleteNestedKey(merged, propsToDeleteWithoutTextContent);
|
|
5740
5839
|
return merged;
|
|
5741
5840
|
};
|
|
5742
|
-
var
|
|
5743
|
-
var DisableInteractivityContext = createContext19(false);
|
|
5841
|
+
var DisableInteractivityContext = createContext20(false);
|
|
5744
5842
|
var DisableInteractivityProvider = ({ children }) => {
|
|
5745
5843
|
return React18.createElement(DisableInteractivityContext.Provider, { value: true }, children);
|
|
5746
5844
|
};
|
|
5747
|
-
var EnableInteractivityContext =
|
|
5845
|
+
var EnableInteractivityContext = createContext20(false);
|
|
5748
5846
|
var EnableInteractivityProvider = ({ children }) => {
|
|
5749
5847
|
return React18.createElement(EnableInteractivityContext.Provider, { value: true }, children);
|
|
5750
5848
|
};
|
|
@@ -5758,6 +5856,7 @@ var withInteractivitySchema = ({
|
|
|
5758
5856
|
const schemaWithSequenceName = extendSchemaWithSequenceName(schema);
|
|
5759
5857
|
const flatSchema = getFlatSchemaWithAllKeys(schemaWithSequenceName);
|
|
5760
5858
|
const flatKeys = Object.keys(flatSchema);
|
|
5859
|
+
const stackToOverrideMap = {};
|
|
5761
5860
|
const Wrapped = forwardRef2((props, ref) => {
|
|
5762
5861
|
const {
|
|
5763
5862
|
_remotionInternalStack: internalStack,
|
|
@@ -5846,7 +5945,10 @@ var withInteractivitySchema = ({
|
|
|
5846
5945
|
schema: schemaWithSequenceName,
|
|
5847
5946
|
currentValue: currentRuntimeValueDotNotation,
|
|
5848
5947
|
overrideValues: dragOverrides,
|
|
5849
|
-
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses,
|
|
5948
|
+
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, {
|
|
5949
|
+
...nodePath,
|
|
5950
|
+
videoConfigValues
|
|
5951
|
+
}),
|
|
5850
5952
|
frame
|
|
5851
5953
|
});
|
|
5852
5954
|
}, [
|
|
@@ -5854,6 +5956,7 @@ var withInteractivitySchema = ({
|
|
|
5854
5956
|
dragOverrides,
|
|
5855
5957
|
nodePath,
|
|
5856
5958
|
propStatuses,
|
|
5959
|
+
videoConfigValues,
|
|
5857
5960
|
frame
|
|
5858
5961
|
]);
|
|
5859
5962
|
const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
|
|
@@ -5876,7 +5979,7 @@ var withInteractivitySchema = ({
|
|
|
5876
5979
|
|
|
5877
5980
|
// src/Sequence.tsx
|
|
5878
5981
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
5879
|
-
var SeriesContentVisibilityContext =
|
|
5982
|
+
var SeriesContentVisibilityContext = createContext21(true);
|
|
5880
5983
|
var EMPTY_EFFECTS = [];
|
|
5881
5984
|
var RegularSequenceRefForwardingFunction = ({
|
|
5882
5985
|
from = 0,
|
|
@@ -5893,6 +5996,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5893
5996
|
hidden = false,
|
|
5894
5997
|
controls,
|
|
5895
5998
|
_remotionInternalEffects,
|
|
5999
|
+
_remotionInternalTimelineTrack: timelineTrackItem,
|
|
5896
6000
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
5897
6001
|
_remotionInternalStack: stack,
|
|
5898
6002
|
_remotionInternalDocumentationLink: documentationLink,
|
|
@@ -5910,6 +6014,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5910
6014
|
const { layout = "absolute-fill" } = other;
|
|
5911
6015
|
const [id] = useState6(() => String(Math.random()));
|
|
5912
6016
|
const parentSequence = useContext21(SequenceContext);
|
|
6017
|
+
const timelineTrack = useContext21(TimelineTrackContext);
|
|
6018
|
+
const timelineTrackRole = timelineTrackItem?.role ?? "clip";
|
|
5913
6019
|
const parentPlaybackRate = parentSequence?.playbackRate ?? 1;
|
|
5914
6020
|
const cumulativePlaybackRate = parentPlaybackRate * playbackRate;
|
|
5915
6021
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
@@ -6086,7 +6192,14 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6086
6192
|
const isInsideSeries = useContext21(IsInsideSeriesContext);
|
|
6087
6193
|
const stackRef = useRef7(null);
|
|
6088
6194
|
stackRef.current = controls ? getStackForControls(controls) ?? stack ?? null : stack ?? null;
|
|
6195
|
+
const getStack = useCallback6(() => stackRef.current, []);
|
|
6089
6196
|
const registeredFrozenFrame = typeof freeze === "number" ? freeze : null;
|
|
6197
|
+
const currentFrame = registeredFrozenFrame ?? (absoluteFrame - currentSequenceStart) * cumulativePlaybackRate;
|
|
6198
|
+
const currentFrameRef = useRef7(currentFrame);
|
|
6199
|
+
useLayoutEffect5(() => {
|
|
6200
|
+
currentFrameRef.current = currentFrame;
|
|
6201
|
+
}, [currentFrame]);
|
|
6202
|
+
const getCurrentFrame = useCallback6(() => currentFrameRef.current, []);
|
|
6090
6203
|
const registeredTrimBefore = trimBefore === 0 ? null : trimBefore;
|
|
6091
6204
|
const parentCumulatedNegativeFrom = parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
6092
6205
|
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
@@ -6128,9 +6241,16 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6128
6241
|
controlsSupportsEffects
|
|
6129
6242
|
]);
|
|
6130
6243
|
const getSequenceForRegistration = useCallback6(() => {
|
|
6244
|
+
const trackRegistration = timelineTrack ? {
|
|
6245
|
+
timelineTrack: {
|
|
6246
|
+
...timelineTrack,
|
|
6247
|
+
role: timelineTrackRole
|
|
6248
|
+
}
|
|
6249
|
+
} : {};
|
|
6131
6250
|
if (isMedia) {
|
|
6132
6251
|
if (isMedia.type === "image") {
|
|
6133
6252
|
return {
|
|
6253
|
+
...trackRegistration,
|
|
6134
6254
|
sequencePlaybackRate: playbackRate,
|
|
6135
6255
|
type: "image",
|
|
6136
6256
|
controls: registrationControls,
|
|
@@ -6149,7 +6269,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6149
6269
|
showInTimeline,
|
|
6150
6270
|
timelineOrder: null,
|
|
6151
6271
|
src: isMedia.src,
|
|
6152
|
-
getStack
|
|
6272
|
+
getStack,
|
|
6273
|
+
getCurrentFrame,
|
|
6153
6274
|
refForOutline: refForOutline ?? null,
|
|
6154
6275
|
isInsideSeries,
|
|
6155
6276
|
frozenFrame: registeredFrozenFrame,
|
|
@@ -6157,6 +6278,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6157
6278
|
};
|
|
6158
6279
|
}
|
|
6159
6280
|
return {
|
|
6281
|
+
...trackRegistration,
|
|
6160
6282
|
type: isMedia.type,
|
|
6161
6283
|
sequencePlaybackRate: playbackRate,
|
|
6162
6284
|
controls: registrationControls,
|
|
@@ -6177,7 +6299,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6177
6299
|
showInTimeline,
|
|
6178
6300
|
timelineOrder: null,
|
|
6179
6301
|
src: isMedia.data.src,
|
|
6180
|
-
getStack
|
|
6302
|
+
getStack,
|
|
6303
|
+
getCurrentFrame,
|
|
6181
6304
|
startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
|
|
6182
6305
|
mediaFrameAtSequenceZero,
|
|
6183
6306
|
volume: isMedia.data.volumes,
|
|
@@ -6190,6 +6313,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6190
6313
|
};
|
|
6191
6314
|
}
|
|
6192
6315
|
return {
|
|
6316
|
+
...trackRegistration,
|
|
6193
6317
|
from,
|
|
6194
6318
|
sequencePlaybackRate: playbackRate,
|
|
6195
6319
|
trimBefore: registeredTrimBefore,
|
|
@@ -6205,7 +6329,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6205
6329
|
showInTimeline,
|
|
6206
6330
|
timelineOrder: null,
|
|
6207
6331
|
loopDisplay: resolvedLoopDisplay,
|
|
6208
|
-
getStack
|
|
6332
|
+
getStack,
|
|
6333
|
+
getCurrentFrame,
|
|
6209
6334
|
premountDisplay: premountDisplay ?? null,
|
|
6210
6335
|
postmountDisplay: postmountDisplay ?? null,
|
|
6211
6336
|
controls: registrationControls,
|
|
@@ -6218,6 +6343,10 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6218
6343
|
};
|
|
6219
6344
|
}, [
|
|
6220
6345
|
id,
|
|
6346
|
+
timelineTrack,
|
|
6347
|
+
timelineTrackRole,
|
|
6348
|
+
getCurrentFrame,
|
|
6349
|
+
getStack,
|
|
6221
6350
|
timelineClipName,
|
|
6222
6351
|
playbackRate,
|
|
6223
6352
|
parentSequence?.id,
|
|
@@ -6304,18 +6433,22 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
6304
6433
|
}) : null;
|
|
6305
6434
|
}
|
|
6306
6435
|
const retainSeriesRegistration = env.isStudio && canInferDuration;
|
|
6307
|
-
const
|
|
6436
|
+
const renderedContent = loopedContent === null ? retainSeriesRegistration ? children : null : other.layout === "none" ? loopedContent : /* @__PURE__ */ jsx12(AbsoluteFillElement, {
|
|
6308
6437
|
ref: sequenceRef,
|
|
6309
6438
|
style: defaultStyle,
|
|
6310
6439
|
className: other.className,
|
|
6311
6440
|
children: loopedContent
|
|
6312
6441
|
});
|
|
6313
|
-
const
|
|
6442
|
+
const sequenceContent = /* @__PURE__ */ jsx12(SequenceContext.Provider, {
|
|
6314
6443
|
value: contextValue,
|
|
6315
6444
|
children: retainSeriesRegistration ? /* @__PURE__ */ jsx12(SeriesContentVisibilityContext.Provider, {
|
|
6316
6445
|
value: content2 !== null,
|
|
6317
|
-
children:
|
|
6318
|
-
}) :
|
|
6446
|
+
children: renderedContent
|
|
6447
|
+
}) : renderedContent
|
|
6448
|
+
});
|
|
6449
|
+
const sequence = /* @__PURE__ */ jsx12(TimelineTrackContext.Provider, {
|
|
6450
|
+
value: timelineTrackRole === "track" || timelineTrackRole === "clip" && !showInTimeline ? timelineTrack : null,
|
|
6451
|
+
children: sequenceContent
|
|
6319
6452
|
});
|
|
6320
6453
|
return shouldDiscoverOutline ? /* @__PURE__ */ jsx12(SequenceOrderMarker, {
|
|
6321
6454
|
sequenceId: id,
|
|
@@ -6569,7 +6702,7 @@ import {
|
|
|
6569
6702
|
forwardRef as forwardRef4,
|
|
6570
6703
|
useEffect as useEffect6,
|
|
6571
6704
|
useImperativeHandle as useImperativeHandle2,
|
|
6572
|
-
useLayoutEffect as
|
|
6705
|
+
useLayoutEffect as useLayoutEffect6,
|
|
6573
6706
|
useRef as useRef10,
|
|
6574
6707
|
useState as useState7
|
|
6575
6708
|
} from "react";
|
|
@@ -7337,7 +7470,8 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
7337
7470
|
const ref = useRef10(null);
|
|
7338
7471
|
const memoizedEffects = useMemoizedEffects({
|
|
7339
7472
|
effects,
|
|
7340
|
-
overrideId: controls?.overrideId ?? null
|
|
7473
|
+
overrideId: controls?.overrideId ?? null,
|
|
7474
|
+
videoConfigValues: controls?.videoConfigValues ?? null
|
|
7341
7475
|
});
|
|
7342
7476
|
useImperativeHandle2(canvasRef, () => {
|
|
7343
7477
|
const c2 = ref.current?.getCanvas();
|
|
@@ -7404,7 +7538,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
7404
7538
|
imageDecoder?.close();
|
|
7405
7539
|
};
|
|
7406
7540
|
}, [imageDecoder]);
|
|
7407
|
-
|
|
7541
|
+
useLayoutEffect6(() => {
|
|
7408
7542
|
if (!imageDecoder) {
|
|
7409
7543
|
return;
|
|
7410
7544
|
}
|
|
@@ -7671,14 +7805,14 @@ var createEffect = (definition) => {
|
|
|
7671
7805
|
return factory;
|
|
7672
7806
|
};
|
|
7673
7807
|
// src/Artifact.tsx
|
|
7674
|
-
import { useContext as useContext22, useLayoutEffect as
|
|
7808
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect8, useState as useState9 } from "react";
|
|
7675
7809
|
|
|
7676
7810
|
// src/RenderAssetManager.tsx
|
|
7677
7811
|
import {
|
|
7678
|
-
createContext as
|
|
7812
|
+
createContext as createContext22,
|
|
7679
7813
|
useCallback as useCallback9,
|
|
7680
7814
|
useImperativeHandle as useImperativeHandle3,
|
|
7681
|
-
useLayoutEffect as
|
|
7815
|
+
useLayoutEffect as useLayoutEffect7,
|
|
7682
7816
|
useMemo as useMemo18,
|
|
7683
7817
|
useRef as useRef11,
|
|
7684
7818
|
useState as useState8
|
|
@@ -7717,7 +7851,7 @@ var validateRenderAsset = (artifact) => {
|
|
|
7717
7851
|
|
|
7718
7852
|
// src/RenderAssetManager.tsx
|
|
7719
7853
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
7720
|
-
var RenderAssetManager =
|
|
7854
|
+
var RenderAssetManager = createContext22({
|
|
7721
7855
|
registerRenderAsset: () => {
|
|
7722
7856
|
return;
|
|
7723
7857
|
},
|
|
@@ -7750,7 +7884,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
7750
7884
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
7751
7885
|
setRenderAssets(renderAssetsRef.current);
|
|
7752
7886
|
}, []);
|
|
7753
|
-
|
|
7887
|
+
useLayoutEffect7(() => {
|
|
7754
7888
|
if (typeof window !== "undefined") {
|
|
7755
7889
|
window.remotion_collectAssets = () => {
|
|
7756
7890
|
const assets = renderAssetsRef.current;
|
|
@@ -7782,7 +7916,7 @@ var Artifact = ({ filename, content: content2, downloadBehavior }) => {
|
|
|
7782
7916
|
const [id] = useState9(() => {
|
|
7783
7917
|
return String(Math.random());
|
|
7784
7918
|
});
|
|
7785
|
-
|
|
7919
|
+
useLayoutEffect8(() => {
|
|
7786
7920
|
if (!env.isRendering) {
|
|
7787
7921
|
return;
|
|
7788
7922
|
}
|
|
@@ -7875,9 +8009,9 @@ var getMediaTrimAfter = ({
|
|
|
7875
8009
|
};
|
|
7876
8010
|
|
|
7877
8011
|
// src/loop/index.tsx
|
|
7878
|
-
import React22, { createContext as
|
|
8012
|
+
import React22, { createContext as createContext23, useContext as useContext23, useMemo as useMemo19 } from "react";
|
|
7879
8013
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
7880
|
-
var LoopTimelineContext =
|
|
8014
|
+
var LoopTimelineContext = createContext23(null);
|
|
7881
8015
|
var useLoop = () => {
|
|
7882
8016
|
return React22.useContext(LoopContext);
|
|
7883
8017
|
};
|
|
@@ -7978,9 +8112,9 @@ var playbackLogging = ({
|
|
|
7978
8112
|
};
|
|
7979
8113
|
|
|
7980
8114
|
// src/prefetch-state.tsx
|
|
7981
|
-
import { createContext as
|
|
8115
|
+
import { createContext as createContext24, useEffect as useEffect7, useState as useState10 } from "react";
|
|
7982
8116
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
7983
|
-
var PreloadContext =
|
|
8117
|
+
var PreloadContext = createContext24({});
|
|
7984
8118
|
var preloads = {};
|
|
7985
8119
|
var updaters = [];
|
|
7986
8120
|
var setPreloads = (updater) => {
|
|
@@ -8305,7 +8439,7 @@ var resolveTrimProps = ({
|
|
|
8305
8439
|
};
|
|
8306
8440
|
|
|
8307
8441
|
// src/video/duration-state.tsx
|
|
8308
|
-
import { createContext as
|
|
8442
|
+
import { createContext as createContext25, useMemo as useMemo20, useReducer } from "react";
|
|
8309
8443
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
8310
8444
|
var durationReducer = (state, action) => {
|
|
8311
8445
|
switch (action.type) {
|
|
@@ -8323,7 +8457,7 @@ var durationReducer = (state, action) => {
|
|
|
8323
8457
|
return state;
|
|
8324
8458
|
}
|
|
8325
8459
|
};
|
|
8326
|
-
var DurationsContext =
|
|
8460
|
+
var DurationsContext = createContext25({
|
|
8327
8461
|
durations: {},
|
|
8328
8462
|
setDurations: () => {
|
|
8329
8463
|
throw new Error("context missing");
|
|
@@ -8408,11 +8542,11 @@ var random = (seed, dummy) => {
|
|
|
8408
8542
|
};
|
|
8409
8543
|
|
|
8410
8544
|
// src/use-amplification.ts
|
|
8411
|
-
import { useContext as useContext26, useLayoutEffect as
|
|
8545
|
+
import { useContext as useContext26, useLayoutEffect as useLayoutEffect9, useRef as useRef15 } from "react";
|
|
8412
8546
|
|
|
8413
8547
|
// src/audio/shared-audio-tags.tsx
|
|
8414
8548
|
import React25, {
|
|
8415
|
-
createContext as
|
|
8549
|
+
createContext as createContext26,
|
|
8416
8550
|
createRef as createRef2,
|
|
8417
8551
|
useCallback as useCallback10,
|
|
8418
8552
|
useContext as useContext25,
|
|
@@ -8697,8 +8831,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
8697
8831
|
}
|
|
8698
8832
|
return true;
|
|
8699
8833
|
};
|
|
8700
|
-
var SharedAudioContext =
|
|
8701
|
-
var SharedAudioTagsContext =
|
|
8834
|
+
var SharedAudioContext = createContext26(null);
|
|
8835
|
+
var SharedAudioTagsContext = createContext26(null);
|
|
8702
8836
|
var shouldSaveForLater = (state) => {
|
|
8703
8837
|
if (state === "suspended" || state === "running-to-suspended" || state === "interrupted") {
|
|
8704
8838
|
return true;
|
|
@@ -9320,7 +9454,7 @@ var useVolume = ({
|
|
|
9320
9454
|
}
|
|
9321
9455
|
const { audioContext, gainNode: masterGainNode } = sharedAudioContext;
|
|
9322
9456
|
if (typeof window !== "undefined") {
|
|
9323
|
-
|
|
9457
|
+
useLayoutEffect9(() => {
|
|
9324
9458
|
if (!audioContext) {
|
|
9325
9459
|
return;
|
|
9326
9460
|
}
|
|
@@ -9383,8 +9517,8 @@ var useVolume = ({
|
|
|
9383
9517
|
import { useCallback as useCallback11, useContext as useContext28, useMemo as useMemo23 } from "react";
|
|
9384
9518
|
|
|
9385
9519
|
// src/audio/use-audio-frame.ts
|
|
9386
|
-
import { createContext as
|
|
9387
|
-
var Html5MediaTrimContext =
|
|
9520
|
+
import { createContext as createContext27, useContext as useContext27 } from "react";
|
|
9521
|
+
var Html5MediaTrimContext = createContext27(0);
|
|
9388
9522
|
var useMediaStartsAt = () => {
|
|
9389
9523
|
const parentSequence = useContext27(SequenceContext);
|
|
9390
9524
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
@@ -9470,6 +9604,7 @@ var evaluateVolume = ({
|
|
|
9470
9604
|
};
|
|
9471
9605
|
|
|
9472
9606
|
// src/use-media-in-timeline.ts
|
|
9607
|
+
var EMPTY_EFFECTS2 = [];
|
|
9473
9608
|
var useBasicMediaInTimeline = ({
|
|
9474
9609
|
volume,
|
|
9475
9610
|
mediaVolume,
|
|
@@ -9566,6 +9701,7 @@ var useMediaInTimeline = ({
|
|
|
9566
9701
|
muted
|
|
9567
9702
|
}) => {
|
|
9568
9703
|
const parentSequence = useContext28(SequenceContext);
|
|
9704
|
+
const timelineTrack = useContext28(TimelineTrackContext);
|
|
9569
9705
|
const mediaTrimBefore = useContext28(Html5MediaTrimContext);
|
|
9570
9706
|
const sequenceRegistrationEnabled = useContext28(SequenceRegistrationContext);
|
|
9571
9707
|
const { durationInFrames } = useVideoConfig();
|
|
@@ -9632,6 +9768,12 @@ var useMediaInTimeline = ({
|
|
|
9632
9768
|
}
|
|
9633
9769
|
return {
|
|
9634
9770
|
effectRuntimeValues: null,
|
|
9771
|
+
...timelineTrack ? {
|
|
9772
|
+
timelineTrack: {
|
|
9773
|
+
...timelineTrack,
|
|
9774
|
+
role: "clip"
|
|
9775
|
+
}
|
|
9776
|
+
} : {},
|
|
9635
9777
|
type: mediaType,
|
|
9636
9778
|
src,
|
|
9637
9779
|
id,
|
|
@@ -9655,7 +9797,7 @@ var useMediaInTimeline = ({
|
|
|
9655
9797
|
premountDisplay,
|
|
9656
9798
|
postmountDisplay,
|
|
9657
9799
|
controls: null,
|
|
9658
|
-
effects:
|
|
9800
|
+
effects: EMPTY_EFFECTS2,
|
|
9659
9801
|
refForOutline: automaticOutlineRef,
|
|
9660
9802
|
isInsideSeries: false,
|
|
9661
9803
|
frozenFrame: null,
|
|
@@ -9664,7 +9806,8 @@ var useMediaInTimeline = ({
|
|
|
9664
9806
|
}, [
|
|
9665
9807
|
duration,
|
|
9666
9808
|
id,
|
|
9667
|
-
|
|
9809
|
+
timelineTrack,
|
|
9810
|
+
parentSequence?.id,
|
|
9668
9811
|
src,
|
|
9669
9812
|
volumes,
|
|
9670
9813
|
doesVolumeChange,
|
|
@@ -9693,7 +9836,7 @@ import {
|
|
|
9693
9836
|
useCallback as useCallback14,
|
|
9694
9837
|
useContext as useContext31,
|
|
9695
9838
|
useEffect as useEffect12,
|
|
9696
|
-
useLayoutEffect as
|
|
9839
|
+
useLayoutEffect as useLayoutEffect11,
|
|
9697
9840
|
useRef as useRef18
|
|
9698
9841
|
} from "react";
|
|
9699
9842
|
|
|
@@ -9708,7 +9851,7 @@ import React26, {
|
|
|
9708
9851
|
useCallback as useCallback12,
|
|
9709
9852
|
useContext as useContext29,
|
|
9710
9853
|
useEffect as useEffect9,
|
|
9711
|
-
useLayoutEffect as
|
|
9854
|
+
useLayoutEffect as useLayoutEffect10,
|
|
9712
9855
|
useMemo as useMemo24,
|
|
9713
9856
|
useState as useState12
|
|
9714
9857
|
} from "react";
|
|
@@ -9752,7 +9895,7 @@ var useBufferManager = (logLevel, mountTime, setBuffering, isBuffering) => {
|
|
|
9752
9895
|
}
|
|
9753
9896
|
}, [blockCount]);
|
|
9754
9897
|
if (typeof window !== "undefined") {
|
|
9755
|
-
|
|
9898
|
+
useLayoutEffect10(() => {
|
|
9756
9899
|
if (rendering) {
|
|
9757
9900
|
return;
|
|
9758
9901
|
}
|
|
@@ -10360,7 +10503,7 @@ var useMediaPlayback = ({
|
|
|
10360
10503
|
return acceptableTimeshift ?? DEFAULT_ACCEPTABLE_TIMESHIFT_WITH_AMPLIFICATION;
|
|
10361
10504
|
})();
|
|
10362
10505
|
const env = useRemotionEnvironment();
|
|
10363
|
-
|
|
10506
|
+
useLayoutEffect11(() => {
|
|
10364
10507
|
const playbackRateToSet = Math.max(0, playbackRate);
|
|
10365
10508
|
if (mediaRef.current && mediaRef.current.defaultPlaybackRate !== playbackRateToSet) {
|
|
10366
10509
|
mediaRef.current.defaultPlaybackRate = playbackRateToSet;
|
|
@@ -10589,12 +10732,12 @@ var useMediaTag = ({
|
|
|
10589
10732
|
};
|
|
10590
10733
|
|
|
10591
10734
|
// src/volume-position-state.ts
|
|
10592
|
-
import { createContext as
|
|
10593
|
-
var MediaVolumeContext =
|
|
10735
|
+
import { createContext as createContext28, useContext as useContext33, useMemo as useMemo27 } from "react";
|
|
10736
|
+
var MediaVolumeContext = createContext28({
|
|
10594
10737
|
playerMuted: false,
|
|
10595
10738
|
mediaVolume: 1
|
|
10596
10739
|
});
|
|
10597
|
-
var SetMediaVolumeContext =
|
|
10740
|
+
var SetMediaVolumeContext = createContext28({
|
|
10598
10741
|
setPlayerMuted: () => {
|
|
10599
10742
|
throw new Error("default");
|
|
10600
10743
|
},
|
|
@@ -10858,15 +11001,15 @@ import {
|
|
|
10858
11001
|
useContext as useContext36,
|
|
10859
11002
|
useEffect as useEffect15,
|
|
10860
11003
|
useImperativeHandle as useImperativeHandle5,
|
|
10861
|
-
useLayoutEffect as
|
|
11004
|
+
useLayoutEffect as useLayoutEffect12,
|
|
10862
11005
|
useMemo as useMemo30,
|
|
10863
11006
|
useRef as useRef21
|
|
10864
11007
|
} from "react";
|
|
10865
11008
|
|
|
10866
11009
|
// src/use-media-enabled.tsx
|
|
10867
|
-
import { createContext as
|
|
11010
|
+
import { createContext as createContext29, useContext as useContext35, useMemo as useMemo29 } from "react";
|
|
10868
11011
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
10869
|
-
var MediaEnabledContext =
|
|
11012
|
+
var MediaEnabledContext = createContext29(null);
|
|
10870
11013
|
var useVideoEnabled = () => {
|
|
10871
11014
|
const context = useContext35(MediaEnabledContext);
|
|
10872
11015
|
if (!context) {
|
|
@@ -10990,7 +11133,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
10990
11133
|
]);
|
|
10991
11134
|
const { src } = props;
|
|
10992
11135
|
const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
|
|
10993
|
-
|
|
11136
|
+
useLayoutEffect12(() => {
|
|
10994
11137
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
10995
11138
|
return;
|
|
10996
11139
|
}
|
|
@@ -11248,6 +11391,7 @@ var SolidInner = ({
|
|
|
11248
11391
|
style,
|
|
11249
11392
|
pixelDensity,
|
|
11250
11393
|
overrideId,
|
|
11394
|
+
videoConfigValues,
|
|
11251
11395
|
reference
|
|
11252
11396
|
}) => {
|
|
11253
11397
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
@@ -11257,7 +11401,8 @@ var SolidInner = ({
|
|
|
11257
11401
|
const [outputCanvas, setOutputCanvas] = useState15(null);
|
|
11258
11402
|
const memoizedEffects = useMemoizedEffects({
|
|
11259
11403
|
effects,
|
|
11260
|
-
overrideId: overrideId ?? null
|
|
11404
|
+
overrideId: overrideId ?? null,
|
|
11405
|
+
videoConfigValues
|
|
11261
11406
|
});
|
|
11262
11407
|
const sourceCanvas = useMemo31(() => {
|
|
11263
11408
|
if (typeof document === "undefined") {
|
|
@@ -11430,6 +11575,7 @@ var SolidOuter = forwardRef8(({
|
|
|
11430
11575
|
_remotionInternalIsPostmounting: postmountingActive,
|
|
11431
11576
|
children: /* @__PURE__ */ jsx26(SolidInner, {
|
|
11432
11577
|
reference: actualRef,
|
|
11578
|
+
videoConfigValues: controls?.videoConfigValues ?? null,
|
|
11433
11579
|
overrideId: controls?.overrideId ?? null,
|
|
11434
11580
|
color,
|
|
11435
11581
|
height,
|
|
@@ -11453,11 +11599,11 @@ Solid.displayName = "Solid";
|
|
|
11453
11599
|
addSequenceStackTraces(Solid);
|
|
11454
11600
|
// src/HtmlInCanvas.tsx
|
|
11455
11601
|
import {
|
|
11456
|
-
createContext as
|
|
11602
|
+
createContext as createContext30,
|
|
11457
11603
|
forwardRef as forwardRef9,
|
|
11458
11604
|
useCallback as useCallback18,
|
|
11459
11605
|
useContext as useContext38,
|
|
11460
|
-
useLayoutEffect as
|
|
11606
|
+
useLayoutEffect as useLayoutEffect13,
|
|
11461
11607
|
useMemo as useMemo32,
|
|
11462
11608
|
useRef as useRef23
|
|
11463
11609
|
} from "react";
|
|
@@ -11568,7 +11714,7 @@ var defaultOnPaint = ({
|
|
|
11568
11714
|
ctx.reset();
|
|
11569
11715
|
ctx.drawElementImage(elementImage, 0, 0);
|
|
11570
11716
|
};
|
|
11571
|
-
var HtmlInCanvasAncestorContext =
|
|
11717
|
+
var HtmlInCanvasAncestorContext = createContext30(false);
|
|
11572
11718
|
var HtmlInCanvasContent = forwardRef9(({
|
|
11573
11719
|
width,
|
|
11574
11720
|
height,
|
|
@@ -11611,7 +11757,8 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
11611
11757
|
const chainState = useEffectChainState();
|
|
11612
11758
|
const memoizedEffects = useMemoizedEffects({
|
|
11613
11759
|
effects,
|
|
11614
|
-
overrideId: controls?.overrideId ?? null
|
|
11760
|
+
overrideId: controls?.overrideId ?? null,
|
|
11761
|
+
videoConfigValues: controls?.videoConfigValues ?? null
|
|
11615
11762
|
});
|
|
11616
11763
|
const effectsRef = useRef23(memoizedEffects);
|
|
11617
11764
|
effectsRef.current = memoizedEffects;
|
|
@@ -11748,7 +11895,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
11748
11895
|
resolvedPixelDensity,
|
|
11749
11896
|
canRetryMissingPaintRecord
|
|
11750
11897
|
]);
|
|
11751
|
-
|
|
11898
|
+
useLayoutEffect13(() => {
|
|
11752
11899
|
const placeholder = canvas2dRef.current;
|
|
11753
11900
|
if (!placeholder) {
|
|
11754
11901
|
throw new Error("Canvas not found");
|
|
@@ -11782,7 +11929,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
11782
11929
|
usesDirectLayoutCanvas
|
|
11783
11930
|
]);
|
|
11784
11931
|
const onPaintChangedRef = useRef23(false);
|
|
11785
|
-
|
|
11932
|
+
useLayoutEffect13(() => {
|
|
11786
11933
|
if (!onPaintChangedRef.current) {
|
|
11787
11934
|
onPaintChangedRef.current = true;
|
|
11788
11935
|
return;
|
|
@@ -11793,7 +11940,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
11793
11940
|
}
|
|
11794
11941
|
canvas.requestPaint?.();
|
|
11795
11942
|
}, [onPaint, memoizedEffects]);
|
|
11796
|
-
|
|
11943
|
+
useLayoutEffect13(() => {
|
|
11797
11944
|
const canvas = canvas2dRef.current;
|
|
11798
11945
|
if (!canvas) {
|
|
11799
11946
|
return;
|
|
@@ -11971,7 +12118,7 @@ import {
|
|
|
11971
12118
|
useCallback as useCallback19,
|
|
11972
12119
|
useContext as useContext39,
|
|
11973
12120
|
useImperativeHandle as useImperativeHandle7,
|
|
11974
|
-
useLayoutEffect as
|
|
12121
|
+
useLayoutEffect as useLayoutEffect14,
|
|
11975
12122
|
useMemo as useMemo33,
|
|
11976
12123
|
useRef as useRef24,
|
|
11977
12124
|
useState as useState16
|
|
@@ -12113,7 +12260,8 @@ var CanvasImageContent = forwardRef10(({
|
|
|
12113
12260
|
const chainState = useEffectChainState();
|
|
12114
12261
|
const memoizedEffects = useMemoizedEffects({
|
|
12115
12262
|
effects,
|
|
12116
|
-
overrideId: controls?.overrideId ?? null
|
|
12263
|
+
overrideId: controls?.overrideId ?? null,
|
|
12264
|
+
videoConfigValues: controls?.videoConfigValues ?? null
|
|
12117
12265
|
});
|
|
12118
12266
|
const sequenceContext = useContext39(SequenceContext);
|
|
12119
12267
|
const pendingLoadDelayRef = useRef24(null);
|
|
@@ -12146,7 +12294,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
12146
12294
|
ref.current = canvas;
|
|
12147
12295
|
}
|
|
12148
12296
|
}, [ref]);
|
|
12149
|
-
|
|
12297
|
+
useLayoutEffect14(() => {
|
|
12150
12298
|
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
12151
12299
|
return;
|
|
12152
12300
|
}
|
|
@@ -12158,7 +12306,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
12158
12306
|
isPremounting,
|
|
12159
12307
|
pauseWhenLoading
|
|
12160
12308
|
]);
|
|
12161
|
-
|
|
12309
|
+
useLayoutEffect14(() => {
|
|
12162
12310
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
12163
12311
|
retries: delayRenderRetries ?? undefined,
|
|
12164
12312
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
@@ -12221,7 +12369,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
12221
12369
|
maxRetries,
|
|
12222
12370
|
onError
|
|
12223
12371
|
]);
|
|
12224
|
-
|
|
12372
|
+
useLayoutEffect14(() => {
|
|
12225
12373
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
12226
12374
|
return;
|
|
12227
12375
|
}
|
|
@@ -12521,7 +12669,7 @@ var IFrame = forwardRef11(IFrameRefForwarding);
|
|
|
12521
12669
|
import {
|
|
12522
12670
|
useCallback as useCallback21,
|
|
12523
12671
|
useContext as useContext40,
|
|
12524
|
-
useLayoutEffect as
|
|
12672
|
+
useLayoutEffect as useLayoutEffect15,
|
|
12525
12673
|
useMemo as useMemo34,
|
|
12526
12674
|
useRef as useRef25,
|
|
12527
12675
|
useState as useState18
|
|
@@ -12603,7 +12751,7 @@ var ImgContent = ({
|
|
|
12603
12751
|
} catch {}
|
|
12604
12752
|
}, [cancelRender2, maxRetries, onError, onImageError, retryIn]);
|
|
12605
12753
|
if (typeof window !== "undefined") {
|
|
12606
|
-
|
|
12754
|
+
useLayoutEffect15(() => {
|
|
12607
12755
|
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
12608
12756
|
return;
|
|
12609
12757
|
}
|
|
@@ -12615,7 +12763,7 @@ var ImgContent = ({
|
|
|
12615
12763
|
isPremounting,
|
|
12616
12764
|
pauseWhenLoading
|
|
12617
12765
|
]);
|
|
12618
|
-
|
|
12766
|
+
useLayoutEffect15(() => {
|
|
12619
12767
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
12620
12768
|
if (imageRef.current) {
|
|
12621
12769
|
imageRef.current.src = actualSrc;
|
|
@@ -13318,13 +13466,13 @@ import {
|
|
|
13318
13466
|
useCallback as useCallback23,
|
|
13319
13467
|
useEffect as useEffect17,
|
|
13320
13468
|
useImperativeHandle as useImperativeHandle8,
|
|
13321
|
-
useLayoutEffect as
|
|
13469
|
+
useLayoutEffect as useLayoutEffect16,
|
|
13322
13470
|
useMemo as useMemo35,
|
|
13323
13471
|
useRef as useRef26,
|
|
13324
13472
|
useState as useState19
|
|
13325
13473
|
} from "react";
|
|
13326
13474
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
13327
|
-
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? useEffect17 :
|
|
13475
|
+
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? useEffect17 : useLayoutEffect16;
|
|
13328
13476
|
var CompositionManagerProvider = ({
|
|
13329
13477
|
children,
|
|
13330
13478
|
onlyRenderComposition,
|
|
@@ -13350,11 +13498,9 @@ var CompositionManagerProvider = ({
|
|
|
13350
13498
|
const [compositions, setCompositions] = useState19(() => initialCompositions.map((composition, order) => ({ ...composition, order })));
|
|
13351
13499
|
const currentcompositionsRef = useRef26(compositions);
|
|
13352
13500
|
const updateCompositions = useCallback23((updateComps) => {
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
return updated;
|
|
13357
|
-
});
|
|
13501
|
+
const updated = updateComps(currentcompositionsRef.current);
|
|
13502
|
+
currentcompositionsRef.current = updated;
|
|
13503
|
+
setCompositions(updated);
|
|
13358
13504
|
}, []);
|
|
13359
13505
|
const registerComposition = useCallback23((comp) => {
|
|
13360
13506
|
const orderKey = getCompositionAndFolderOrderKey({
|
|
@@ -13378,10 +13524,8 @@ var CompositionManagerProvider = ({
|
|
|
13378
13524
|
}, [updateCompositions]);
|
|
13379
13525
|
const unregisterComposition = useCallback23((id) => {
|
|
13380
13526
|
internalOrderRef.current.delete(getCompositionAndFolderOrderKey({ type: "composition", id }));
|
|
13381
|
-
|
|
13382
|
-
|
|
13383
|
-
});
|
|
13384
|
-
}, []);
|
|
13527
|
+
updateCompositions((comps) => comps.filter((c2) => c2.id !== id));
|
|
13528
|
+
}, [updateCompositions]);
|
|
13385
13529
|
const registerFolder = useCallback23((name, parent, stack) => {
|
|
13386
13530
|
const orderKey = getCompositionAndFolderOrderKey({
|
|
13387
13531
|
type: "folder",
|
|
@@ -14059,9 +14203,45 @@ var setupEnvVariables = () => {
|
|
|
14059
14203
|
});
|
|
14060
14204
|
};
|
|
14061
14205
|
|
|
14206
|
+
// src/Track.tsx
|
|
14207
|
+
import { useContext as useContext42, useMemo as useMemo37, useState as useState20 } from "react";
|
|
14208
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
14209
|
+
var trackSchema = {
|
|
14210
|
+
name: sequenceSchema.name,
|
|
14211
|
+
hidden: sequenceSchema.hidden
|
|
14212
|
+
};
|
|
14213
|
+
var TrackWithoutSchema = ({
|
|
14214
|
+
name = "Track",
|
|
14215
|
+
children,
|
|
14216
|
+
layout = "none",
|
|
14217
|
+
...props2
|
|
14218
|
+
}) => {
|
|
14219
|
+
const [id] = useState20(() => String(Math.random()));
|
|
14220
|
+
const tracksEnabled = useContext42(ExperimentalTracksEnabledContext);
|
|
14221
|
+
const value = useMemo37(() => tracksEnabled ? { id, name } : null, [id, name, tracksEnabled]);
|
|
14222
|
+
return /* @__PURE__ */ jsx34(TimelineTrackContext.Provider, {
|
|
14223
|
+
value,
|
|
14224
|
+
children: /* @__PURE__ */ jsx34(SequenceWithoutSchema, {
|
|
14225
|
+
...props2,
|
|
14226
|
+
name,
|
|
14227
|
+
layout,
|
|
14228
|
+
_remotionInternalTimelineTrack: { role: "track" },
|
|
14229
|
+
children
|
|
14230
|
+
})
|
|
14231
|
+
});
|
|
14232
|
+
};
|
|
14233
|
+
var Track = withInteractivitySchema({
|
|
14234
|
+
Component: TrackWithoutSchema,
|
|
14235
|
+
componentName: "<Track>",
|
|
14236
|
+
componentIdentity: "dev.remotion.remotion.Track",
|
|
14237
|
+
schema: trackSchema,
|
|
14238
|
+
supportsEffects: false
|
|
14239
|
+
});
|
|
14240
|
+
addSequenceStackTraces(Track);
|
|
14241
|
+
|
|
14062
14242
|
// src/use-pixel-density.ts
|
|
14063
|
-
import
|
|
14064
|
-
var PixelDensityContext =
|
|
14243
|
+
import React42, { useContext as useContext43 } from "react";
|
|
14244
|
+
var PixelDensityContext = React42.createContext(null);
|
|
14065
14245
|
var getBrowserPixelDensity = () => {
|
|
14066
14246
|
if (typeof window === "undefined") {
|
|
14067
14247
|
return 1;
|
|
@@ -14069,8 +14249,8 @@ var getBrowserPixelDensity = () => {
|
|
|
14069
14249
|
return window.devicePixelRatio || 1;
|
|
14070
14250
|
};
|
|
14071
14251
|
var usePixelDensity = (options) => {
|
|
14072
|
-
const pixelDensity =
|
|
14073
|
-
const canUseRemotionHooks =
|
|
14252
|
+
const pixelDensity = useContext43(PixelDensityContext);
|
|
14253
|
+
const canUseRemotionHooks = useContext43(CanUseRemotionHooks);
|
|
14074
14254
|
if (pixelDensity !== null) {
|
|
14075
14255
|
return pixelDensity;
|
|
14076
14256
|
}
|
|
@@ -14092,11 +14272,11 @@ import { useCallback as useCallback26 } from "react";
|
|
|
14092
14272
|
// src/video/OffthreadVideoForRendering.tsx
|
|
14093
14273
|
import {
|
|
14094
14274
|
useCallback as useCallback24,
|
|
14095
|
-
useContext as
|
|
14275
|
+
useContext as useContext44,
|
|
14096
14276
|
useEffect as useEffect18,
|
|
14097
|
-
useLayoutEffect as
|
|
14098
|
-
useMemo as
|
|
14099
|
-
useState as
|
|
14277
|
+
useLayoutEffect as useLayoutEffect17,
|
|
14278
|
+
useMemo as useMemo38,
|
|
14279
|
+
useState as useState21
|
|
14100
14280
|
} from "react";
|
|
14101
14281
|
|
|
14102
14282
|
// src/video/offthread-video-source.ts
|
|
@@ -14110,7 +14290,7 @@ var getOffthreadVideoSource = ({
|
|
|
14110
14290
|
};
|
|
14111
14291
|
|
|
14112
14292
|
// src/video/OffthreadVideoForRendering.tsx
|
|
14113
|
-
import { jsx as
|
|
14293
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
14114
14294
|
var OffthreadVideoForRendering = ({
|
|
14115
14295
|
onError,
|
|
14116
14296
|
volume: volumeProp,
|
|
@@ -14135,14 +14315,14 @@ var OffthreadVideoForRendering = ({
|
|
|
14135
14315
|
const frame = useCurrentFrame();
|
|
14136
14316
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
14137
14317
|
const videoConfig = useUnsafeVideoConfig();
|
|
14138
|
-
const sequenceContext =
|
|
14318
|
+
const sequenceContext = useContext44(SequenceContext);
|
|
14139
14319
|
const sequencePlaybackRate = sequenceContext?.playbackRate ?? 1;
|
|
14140
|
-
const audioStartFrame =
|
|
14141
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14320
|
+
const audioStartFrame = useContext44(Html5MediaTrimContext);
|
|
14321
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext44(RenderAssetManager);
|
|
14142
14322
|
if (!src) {
|
|
14143
14323
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
14144
14324
|
}
|
|
14145
|
-
const id =
|
|
14325
|
+
const id = useMemo38(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14146
14326
|
src,
|
|
14147
14327
|
sequenceContext?.cumulatedFrom,
|
|
14148
14328
|
sequenceContext?.relativeFrom,
|
|
@@ -14198,14 +14378,14 @@ var OffthreadVideoForRendering = ({
|
|
|
14198
14378
|
sequencePlaybackRate,
|
|
14199
14379
|
audioStreamIndex
|
|
14200
14380
|
]);
|
|
14201
|
-
const currentTime =
|
|
14381
|
+
const currentTime = useMemo38(() => {
|
|
14202
14382
|
return getExpectedMediaFrameUncorrected({
|
|
14203
14383
|
frame,
|
|
14204
14384
|
playbackRate: playbackRate || 1,
|
|
14205
14385
|
startFrom: audioStartFrame
|
|
14206
14386
|
}) / videoConfig.fps;
|
|
14207
14387
|
}, [frame, audioStartFrame, playbackRate, videoConfig.fps]);
|
|
14208
|
-
const actualSrc =
|
|
14388
|
+
const actualSrc = useMemo38(() => {
|
|
14209
14389
|
return getOffthreadVideoSource({
|
|
14210
14390
|
src,
|
|
14211
14391
|
currentTime,
|
|
@@ -14213,9 +14393,9 @@ var OffthreadVideoForRendering = ({
|
|
|
14213
14393
|
toneMapped
|
|
14214
14394
|
});
|
|
14215
14395
|
}, [toneMapped, currentTime, src, transparent]);
|
|
14216
|
-
const [imageSrc, setImageSrc] =
|
|
14396
|
+
const [imageSrc, setImageSrc] = useState21(null);
|
|
14217
14397
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
14218
|
-
|
|
14398
|
+
useLayoutEffect17(() => {
|
|
14219
14399
|
if (!window.remotion_videoEnabled) {
|
|
14220
14400
|
return;
|
|
14221
14401
|
}
|
|
@@ -14293,7 +14473,7 @@ var OffthreadVideoForRendering = ({
|
|
|
14293
14473
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
14294
14474
|
}
|
|
14295
14475
|
}, [imageSrc, onError]);
|
|
14296
|
-
const className =
|
|
14476
|
+
const className = useMemo38(() => {
|
|
14297
14477
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
14298
14478
|
}, [props2.className]);
|
|
14299
14479
|
const onImageFrame = useCallback24((img) => {
|
|
@@ -14305,7 +14485,7 @@ var OffthreadVideoForRendering = ({
|
|
|
14305
14485
|
return null;
|
|
14306
14486
|
}
|
|
14307
14487
|
continueRender2(imageSrc.handle);
|
|
14308
|
-
return /* @__PURE__ */
|
|
14488
|
+
return /* @__PURE__ */ jsx35(Img, {
|
|
14309
14489
|
src: imageSrc.src,
|
|
14310
14490
|
delayRenderRetries,
|
|
14311
14491
|
delayRenderTimeoutInMilliseconds,
|
|
@@ -14317,15 +14497,15 @@ var OffthreadVideoForRendering = ({
|
|
|
14317
14497
|
};
|
|
14318
14498
|
|
|
14319
14499
|
// src/video/VideoForPreview.tsx
|
|
14320
|
-
import
|
|
14500
|
+
import React44, {
|
|
14321
14501
|
forwardRef as forwardRef13,
|
|
14322
14502
|
useCallback as useCallback25,
|
|
14323
|
-
useContext as
|
|
14503
|
+
useContext as useContext45,
|
|
14324
14504
|
useEffect as useEffect20,
|
|
14325
14505
|
useImperativeHandle as useImperativeHandle9,
|
|
14326
|
-
useMemo as
|
|
14506
|
+
useMemo as useMemo39,
|
|
14327
14507
|
useRef as useRef27,
|
|
14328
|
-
useState as
|
|
14508
|
+
useState as useState22
|
|
14329
14509
|
} from "react";
|
|
14330
14510
|
|
|
14331
14511
|
// src/video/emit-video-frame.ts
|
|
@@ -14374,14 +14554,14 @@ class MediaPlaybackError extends Error {
|
|
|
14374
14554
|
}
|
|
14375
14555
|
|
|
14376
14556
|
// src/video/VideoForPreview.tsx
|
|
14377
|
-
import { jsx as
|
|
14557
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
14378
14558
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
14379
|
-
const context =
|
|
14559
|
+
const context = useContext45(SharedAudioContext);
|
|
14380
14560
|
if (!context) {
|
|
14381
14561
|
throw new Error("SharedAudioContext not found");
|
|
14382
14562
|
}
|
|
14383
14563
|
const videoRef = useRef27(null);
|
|
14384
|
-
const sharedSource =
|
|
14564
|
+
const sharedSource = useMemo39(() => {
|
|
14385
14565
|
if (!context.audioContext) {
|
|
14386
14566
|
return null;
|
|
14387
14567
|
}
|
|
@@ -14390,7 +14570,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14390
14570
|
ref: videoRef
|
|
14391
14571
|
});
|
|
14392
14572
|
}, [context.audioContext]);
|
|
14393
|
-
const effectToUse =
|
|
14573
|
+
const effectToUse = React44.useInsertionEffect ?? React44.useLayoutEffect;
|
|
14394
14574
|
effectToUse(() => {
|
|
14395
14575
|
return () => {
|
|
14396
14576
|
requestAnimationFrame(() => {
|
|
@@ -14433,11 +14613,11 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14433
14613
|
}
|
|
14434
14614
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
14435
14615
|
const { fps, durationInFrames } = useVideoConfig();
|
|
14436
|
-
const parentSequence =
|
|
14616
|
+
const parentSequence = useContext45(SequenceContext);
|
|
14437
14617
|
const { isStudio } = useRemotionEnvironment();
|
|
14438
14618
|
const logLevel = useLogLevel();
|
|
14439
14619
|
const mountTime = useMountTime();
|
|
14440
|
-
const [timelineId] =
|
|
14620
|
+
const [timelineId] = useState22(() => String(Math.random()));
|
|
14441
14621
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
14442
14622
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
14443
14623
|
}
|
|
@@ -14513,7 +14693,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14513
14693
|
useImperativeHandle9(ref, () => {
|
|
14514
14694
|
return videoRef.current;
|
|
14515
14695
|
}, []);
|
|
14516
|
-
|
|
14696
|
+
useState22(() => playbackLogging({
|
|
14517
14697
|
logLevel,
|
|
14518
14698
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
14519
14699
|
tag: "video",
|
|
@@ -14590,7 +14770,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14590
14770
|
current.preload = "auto";
|
|
14591
14771
|
}
|
|
14592
14772
|
}, []);
|
|
14593
|
-
const actualStyle =
|
|
14773
|
+
const actualStyle = useMemo39(() => {
|
|
14594
14774
|
return {
|
|
14595
14775
|
...style
|
|
14596
14776
|
};
|
|
@@ -14600,7 +14780,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14600
14780
|
requestsVideoFrame: Boolean(onVideoFrame),
|
|
14601
14781
|
isClientSideRendering: false
|
|
14602
14782
|
});
|
|
14603
|
-
const video = /* @__PURE__ */
|
|
14783
|
+
const video = /* @__PURE__ */ jsx36("video", {
|
|
14604
14784
|
...nativeProps,
|
|
14605
14785
|
ref: videoRef,
|
|
14606
14786
|
muted: isMutedForPlayback,
|
|
@@ -14612,7 +14792,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14612
14792
|
crossOrigin: crossOriginValue,
|
|
14613
14793
|
controls: false
|
|
14614
14794
|
});
|
|
14615
|
-
return isStudio || automaticOutlineRef ? /* @__PURE__ */
|
|
14795
|
+
return isStudio || automaticOutlineRef ? /* @__PURE__ */ jsx36(SequenceOrderMarker, {
|
|
14616
14796
|
sequenceId: timelineId,
|
|
14617
14797
|
outlineChildrenRef: automaticOutlineRef,
|
|
14618
14798
|
children: video
|
|
@@ -14621,7 +14801,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14621
14801
|
var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
|
|
14622
14802
|
|
|
14623
14803
|
// src/video/OffthreadVideo.tsx
|
|
14624
|
-
import { jsx as
|
|
14804
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
14625
14805
|
var InnerOffthreadVideo = (props2) => {
|
|
14626
14806
|
const {
|
|
14627
14807
|
startFrom,
|
|
@@ -14665,15 +14845,15 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
14665
14845
|
trimBefore: trimBeforeValue
|
|
14666
14846
|
});
|
|
14667
14847
|
if (typeof trimBeforeValue !== "undefined" || typeof effectiveTrimAfter !== "undefined") {
|
|
14668
|
-
return /* @__PURE__ */
|
|
14848
|
+
return /* @__PURE__ */ jsx37(Html5MediaTrimContext.Provider, {
|
|
14669
14849
|
value: trimBeforeValue ?? 0,
|
|
14670
|
-
children: /* @__PURE__ */
|
|
14850
|
+
children: /* @__PURE__ */ jsx37(Sequence, {
|
|
14671
14851
|
layout: "none",
|
|
14672
14852
|
from: 0 - (trimBeforeValue ?? 0),
|
|
14673
14853
|
showInTimeline: false,
|
|
14674
14854
|
durationInFrames: effectiveTrimAfter === undefined ? undefined : (trimBeforeValue ?? 0) + (effectiveTrimAfter - (trimBeforeValue ?? 0)) / (props2.playbackRate ?? 1),
|
|
14675
14855
|
name,
|
|
14676
|
-
children: /* @__PURE__ */
|
|
14856
|
+
children: /* @__PURE__ */ jsx37(InnerOffthreadVideo, {
|
|
14677
14857
|
pauseWhenBuffering: shouldPauseWhenBuffering,
|
|
14678
14858
|
...otherProps,
|
|
14679
14859
|
trimAfter: undefined,
|
|
@@ -14690,7 +14870,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
14690
14870
|
}
|
|
14691
14871
|
validateMediaProps(props2, "Video");
|
|
14692
14872
|
if (environment.isRendering) {
|
|
14693
|
-
return /* @__PURE__ */
|
|
14873
|
+
return /* @__PURE__ */ jsx37(OffthreadVideoForRendering, {
|
|
14694
14874
|
pauseWhenBuffering: shouldPauseWhenBuffering,
|
|
14695
14875
|
...otherProps,
|
|
14696
14876
|
trimAfter: undefined,
|
|
@@ -14713,7 +14893,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
14713
14893
|
delayRenderTimeoutInMilliseconds,
|
|
14714
14894
|
...propsForPreview
|
|
14715
14895
|
} = otherProps;
|
|
14716
|
-
return /* @__PURE__ */
|
|
14896
|
+
return /* @__PURE__ */ jsx37(VideoForPreview, {
|
|
14717
14897
|
_remotionInternalStack: _remotionInternalStack ?? null,
|
|
14718
14898
|
onDuration,
|
|
14719
14899
|
onlyWarnForMediaSeekingError: true,
|
|
@@ -14763,7 +14943,7 @@ var OffthreadVideo = ({
|
|
|
14763
14943
|
if (imageFormat) {
|
|
14764
14944
|
throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
|
|
14765
14945
|
}
|
|
14766
|
-
return /* @__PURE__ */
|
|
14946
|
+
return /* @__PURE__ */ jsx37(InnerOffthreadVideo, {
|
|
14767
14947
|
acceptableTimeShiftInSeconds,
|
|
14768
14948
|
allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
|
|
14769
14949
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
@@ -14837,27 +15017,31 @@ var watchStaticFile = (fileName, callback) => {
|
|
|
14837
15017
|
};
|
|
14838
15018
|
|
|
14839
15019
|
// src/wrap-remotion-context.tsx
|
|
14840
|
-
import
|
|
14841
|
-
import { jsx as
|
|
15020
|
+
import React46, { useMemo as useMemo40 } from "react";
|
|
15021
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
14842
15022
|
function useRemotionContexts() {
|
|
14843
|
-
const compositionManagerCtx =
|
|
14844
|
-
const timelineContext =
|
|
14845
|
-
const setTimelineContext =
|
|
14846
|
-
const sequenceContext =
|
|
14847
|
-
const
|
|
14848
|
-
const
|
|
14849
|
-
const
|
|
14850
|
-
const
|
|
14851
|
-
const
|
|
14852
|
-
const
|
|
14853
|
-
const
|
|
14854
|
-
const
|
|
14855
|
-
const
|
|
14856
|
-
|
|
15023
|
+
const compositionManagerCtx = React46.useContext(CompositionManager);
|
|
15024
|
+
const timelineContext = React46.useContext(TimelineContext);
|
|
15025
|
+
const setTimelineContext = React46.useContext(SetTimelineContext);
|
|
15026
|
+
const sequenceContext = React46.useContext(SequenceContext);
|
|
15027
|
+
const experimentalTracksEnabled = React46.useContext(ExperimentalTracksEnabledContext);
|
|
15028
|
+
const timelineTrackContext = React46.useContext(TimelineTrackContext);
|
|
15029
|
+
const canUseRemotionHooksContext = React46.useContext(CanUseRemotionHooks);
|
|
15030
|
+
const preloadContext = React46.useContext(PreloadContext);
|
|
15031
|
+
const resolveCompositionContext = React46.useContext(ResolveCompositionContext);
|
|
15032
|
+
const renderAssetManagerContext = React46.useContext(RenderAssetManager);
|
|
15033
|
+
const sequenceManagerContext = React46.useContext(SequenceManager);
|
|
15034
|
+
const sequenceManagerRefContext = React46.useContext(SequenceManagerRefContext);
|
|
15035
|
+
const visualModePropStatusesRefContext = React46.useContext(VisualModePropStatusesRefContext);
|
|
15036
|
+
const bufferManagerContext = React46.useContext(BufferingContextReact);
|
|
15037
|
+
const logLevelContext = React46.useContext(LogLevelContext);
|
|
15038
|
+
return useMemo40(() => ({
|
|
14857
15039
|
compositionManagerCtx,
|
|
14858
15040
|
timelineContext,
|
|
14859
15041
|
setTimelineContext,
|
|
14860
15042
|
sequenceContext,
|
|
15043
|
+
experimentalTracksEnabled,
|
|
15044
|
+
timelineTrackContext,
|
|
14861
15045
|
canUseRemotionHooksContext,
|
|
14862
15046
|
preloadContext,
|
|
14863
15047
|
resolveCompositionContext,
|
|
@@ -14870,6 +15054,8 @@ function useRemotionContexts() {
|
|
|
14870
15054
|
}), [
|
|
14871
15055
|
compositionManagerCtx,
|
|
14872
15056
|
sequenceContext,
|
|
15057
|
+
experimentalTracksEnabled,
|
|
15058
|
+
timelineTrackContext,
|
|
14873
15059
|
setTimelineContext,
|
|
14874
15060
|
timelineContext,
|
|
14875
15061
|
canUseRemotionHooksContext,
|
|
@@ -14885,33 +15071,39 @@ function useRemotionContexts() {
|
|
|
14885
15071
|
}
|
|
14886
15072
|
var RemotionContextProvider = (props2) => {
|
|
14887
15073
|
const { children, contexts } = props2;
|
|
14888
|
-
return /* @__PURE__ */
|
|
15074
|
+
return /* @__PURE__ */ jsx38(LogLevelContext.Provider, {
|
|
14889
15075
|
value: contexts.logLevelContext,
|
|
14890
|
-
children: /* @__PURE__ */
|
|
15076
|
+
children: /* @__PURE__ */ jsx38(CanUseRemotionHooks.Provider, {
|
|
14891
15077
|
value: contexts.canUseRemotionHooksContext,
|
|
14892
|
-
children: /* @__PURE__ */
|
|
15078
|
+
children: /* @__PURE__ */ jsx38(PreloadContext.Provider, {
|
|
14893
15079
|
value: contexts.preloadContext,
|
|
14894
|
-
children: /* @__PURE__ */
|
|
15080
|
+
children: /* @__PURE__ */ jsx38(CompositionManager.Provider, {
|
|
14895
15081
|
value: contexts.compositionManagerCtx,
|
|
14896
|
-
children: /* @__PURE__ */
|
|
15082
|
+
children: /* @__PURE__ */ jsx38(SequenceManagerRefContext.Provider, {
|
|
14897
15083
|
value: contexts.sequenceManagerRefContext,
|
|
14898
|
-
children: /* @__PURE__ */
|
|
15084
|
+
children: /* @__PURE__ */ jsx38(SequenceManager.Provider, {
|
|
14899
15085
|
value: contexts.sequenceManagerContext,
|
|
14900
|
-
children: /* @__PURE__ */
|
|
15086
|
+
children: /* @__PURE__ */ jsx38(VisualModePropStatusesRefContext.Provider, {
|
|
14901
15087
|
value: contexts.visualModePropStatusesRefContext,
|
|
14902
|
-
children: /* @__PURE__ */
|
|
15088
|
+
children: /* @__PURE__ */ jsx38(RenderAssetManager.Provider, {
|
|
14903
15089
|
value: contexts.renderAssetManagerContext,
|
|
14904
|
-
children: /* @__PURE__ */
|
|
15090
|
+
children: /* @__PURE__ */ jsx38(ResolveCompositionContext.Provider, {
|
|
14905
15091
|
value: contexts.resolveCompositionContext,
|
|
14906
|
-
children: /* @__PURE__ */
|
|
15092
|
+
children: /* @__PURE__ */ jsx38(TimelineContext.Provider, {
|
|
14907
15093
|
value: contexts.timelineContext,
|
|
14908
|
-
children: /* @__PURE__ */
|
|
15094
|
+
children: /* @__PURE__ */ jsx38(SetTimelineContext.Provider, {
|
|
14909
15095
|
value: contexts.setTimelineContext,
|
|
14910
|
-
children: /* @__PURE__ */
|
|
15096
|
+
children: /* @__PURE__ */ jsx38(SequenceContext.Provider, {
|
|
14911
15097
|
value: contexts.sequenceContext,
|
|
14912
|
-
children: /* @__PURE__ */
|
|
15098
|
+
children: /* @__PURE__ */ jsx38(BufferingContextReact.Provider, {
|
|
14913
15099
|
value: contexts.bufferManagerContext,
|
|
14914
|
-
children
|
|
15100
|
+
children: /* @__PURE__ */ jsx38(ExperimentalTracksEnabledContext.Provider, {
|
|
15101
|
+
value: contexts.experimentalTracksEnabled,
|
|
15102
|
+
children: /* @__PURE__ */ jsx38(TimelineTrackContext.Provider, {
|
|
15103
|
+
value: contexts.timelineTrackContext,
|
|
15104
|
+
children
|
|
15105
|
+
})
|
|
15106
|
+
})
|
|
14915
15107
|
})
|
|
14916
15108
|
})
|
|
14917
15109
|
})
|
|
@@ -14930,6 +15122,8 @@ var RemotionContextProvider = (props2) => {
|
|
|
14930
15122
|
// src/internals.ts
|
|
14931
15123
|
var compositionSelectorRef = createRef3();
|
|
14932
15124
|
var Internals = {
|
|
15125
|
+
evaluateSourceNumericValue,
|
|
15126
|
+
evaluateSourcePropStatuses,
|
|
14933
15127
|
AbsoluteFillElement,
|
|
14934
15128
|
MaxMediaCacheSizeContext,
|
|
14935
15129
|
getMediabunnyInputResourceKey,
|
|
@@ -14995,6 +15189,9 @@ var Internals = {
|
|
|
14995
15189
|
useLazyComponent,
|
|
14996
15190
|
truthy,
|
|
14997
15191
|
SequenceContext,
|
|
15192
|
+
TimelineTrackContext,
|
|
15193
|
+
ExperimentalTracksEnabledContext,
|
|
15194
|
+
TrackWithoutSchema,
|
|
14998
15195
|
PremountContext,
|
|
14999
15196
|
usePremounting,
|
|
15000
15197
|
resolveSequenceDuration,
|
|
@@ -15125,17 +15322,17 @@ Object.assign(Internals, { useSyncExternalStore: useSyncExternalStore2 });
|
|
|
15125
15322
|
// src/font-face-registry.ts
|
|
15126
15323
|
var fontDataByUrl = new Map;
|
|
15127
15324
|
// src/series/index.tsx
|
|
15128
|
-
import
|
|
15325
|
+
import React48, {
|
|
15129
15326
|
forwardRef as forwardRef14,
|
|
15130
|
-
useMemo as
|
|
15327
|
+
useMemo as useMemo41
|
|
15131
15328
|
} from "react";
|
|
15132
15329
|
|
|
15133
15330
|
// src/series/flatten-children.tsx
|
|
15134
|
-
import
|
|
15331
|
+
import React47 from "react";
|
|
15135
15332
|
var flattenChildren = (children) => {
|
|
15136
|
-
const childrenArray =
|
|
15333
|
+
const childrenArray = React47.Children.toArray(children);
|
|
15137
15334
|
return childrenArray.reduce((flatChildren, child) => {
|
|
15138
|
-
if (child.type ===
|
|
15335
|
+
if (child.type === React47.Fragment) {
|
|
15139
15336
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
15140
15337
|
}
|
|
15141
15338
|
flatChildren.push(child);
|
|
@@ -15144,7 +15341,7 @@ var flattenChildren = (children) => {
|
|
|
15144
15341
|
};
|
|
15145
15342
|
|
|
15146
15343
|
// src/series/index.tsx
|
|
15147
|
-
import { jsx as
|
|
15344
|
+
import { jsx as jsx39, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
|
|
15148
15345
|
var seriesSequenceSchema = {
|
|
15149
15346
|
durationInFrames: Interactive.baseSchema.durationInFrames,
|
|
15150
15347
|
name: Interactive.sequenceSchema.name,
|
|
@@ -15160,7 +15357,7 @@ var SeriesSequenceInner = forwardRef14(({ offset = 0, className = "", _remotionI
|
|
|
15160
15357
|
if (_remotionInternalRender) {
|
|
15161
15358
|
return _remotionInternalRender({ ...props2, offset, className: className || undefined }, ref);
|
|
15162
15359
|
}
|
|
15163
|
-
return /* @__PURE__ */
|
|
15360
|
+
return /* @__PURE__ */ jsx39(IsNotInsideSeriesProvider, {
|
|
15164
15361
|
children: props2.children
|
|
15165
15362
|
});
|
|
15166
15363
|
});
|
|
@@ -15198,7 +15395,7 @@ var validateSeriesSequenceProps = ({
|
|
|
15198
15395
|
return offset;
|
|
15199
15396
|
};
|
|
15200
15397
|
var SeriesInner = (props2) => {
|
|
15201
|
-
const childrenValue =
|
|
15398
|
+
const childrenValue = useMemo41(() => {
|
|
15202
15399
|
const flattenedChildren = flattenChildren(props2.children);
|
|
15203
15400
|
const renderChildren = (i, startFrame) => {
|
|
15204
15401
|
if (i === flattenedChildren.length) {
|
|
@@ -15222,7 +15419,7 @@ var SeriesInner = (props2) => {
|
|
|
15222
15419
|
index: i,
|
|
15223
15420
|
childrenLength: flattenedChildren.length
|
|
15224
15421
|
});
|
|
15225
|
-
return
|
|
15422
|
+
return React48.cloneElement(castedElement, {
|
|
15226
15423
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
15227
15424
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
15228
15425
|
const timelineDurationInFrames = durationInFramesProp / (resolvedProps.playbackRate ?? 1);
|
|
@@ -15248,7 +15445,7 @@ var SeriesInner = (props2) => {
|
|
|
15248
15445
|
const nextStartFrame = startFrame + timelineDurationInFrames + offset;
|
|
15249
15446
|
return /* @__PURE__ */ jsxs4(Fragment, {
|
|
15250
15447
|
children: [
|
|
15251
|
-
/* @__PURE__ */
|
|
15448
|
+
/* @__PURE__ */ jsx39(SequenceWithoutSchemaWithRef, {
|
|
15252
15449
|
ref,
|
|
15253
15450
|
name: name || "<Series.Sequence>",
|
|
15254
15451
|
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
@@ -15257,7 +15454,7 @@ var SeriesInner = (props2) => {
|
|
|
15257
15454
|
durationInFrames: durationInFramesProp,
|
|
15258
15455
|
...passedProps,
|
|
15259
15456
|
_remotionInternalSingleChildComponent: getSingleChildComponent(sequenceChildren),
|
|
15260
|
-
children: /* @__PURE__ */
|
|
15457
|
+
children: /* @__PURE__ */ jsx39(IsNotInsideSeriesProvider, {
|
|
15261
15458
|
children: sequenceChildren
|
|
15262
15459
|
})
|
|
15263
15460
|
}),
|
|
@@ -15269,12 +15466,12 @@ var SeriesInner = (props2) => {
|
|
|
15269
15466
|
};
|
|
15270
15467
|
return renderChildren(0, 0);
|
|
15271
15468
|
}, [props2.children]);
|
|
15272
|
-
return /* @__PURE__ */
|
|
15469
|
+
return /* @__PURE__ */ jsx39(TrackWithoutSchema, {
|
|
15273
15470
|
layout: "none",
|
|
15274
|
-
name: "<Series>",
|
|
15275
15471
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/series",
|
|
15276
15472
|
...props2,
|
|
15277
|
-
|
|
15473
|
+
name: props2.name ?? "<Series>",
|
|
15474
|
+
children: /* @__PURE__ */ jsx39(IsInsideSeriesContainer, {
|
|
15278
15475
|
children: childrenValue
|
|
15279
15476
|
})
|
|
15280
15477
|
});
|
|
@@ -15385,27 +15582,27 @@ var staticFile = (path) => {
|
|
|
15385
15582
|
return preparsed;
|
|
15386
15583
|
};
|
|
15387
15584
|
// src/Still.tsx
|
|
15388
|
-
import
|
|
15585
|
+
import React49 from "react";
|
|
15389
15586
|
var Still = (props2) => {
|
|
15390
15587
|
const newProps = {
|
|
15391
15588
|
...props2,
|
|
15392
15589
|
durationInFrames: 1,
|
|
15393
15590
|
fps: 1
|
|
15394
15591
|
};
|
|
15395
|
-
return
|
|
15592
|
+
return React49.createElement(Composition, newProps);
|
|
15396
15593
|
};
|
|
15397
15594
|
addSequenceStackTraces(Still);
|
|
15398
15595
|
// src/video/html5-video.tsx
|
|
15399
|
-
import { forwardRef as forwardRef16, useCallback as useCallback27, useContext as
|
|
15596
|
+
import { forwardRef as forwardRef16, useCallback as useCallback27, useContext as useContext47 } from "react";
|
|
15400
15597
|
|
|
15401
15598
|
// src/video/VideoForRendering.tsx
|
|
15402
15599
|
import {
|
|
15403
15600
|
forwardRef as forwardRef15,
|
|
15404
|
-
useContext as
|
|
15601
|
+
useContext as useContext46,
|
|
15405
15602
|
useEffect as useEffect21,
|
|
15406
15603
|
useImperativeHandle as useImperativeHandle10,
|
|
15407
|
-
useLayoutEffect as
|
|
15408
|
-
useMemo as
|
|
15604
|
+
useLayoutEffect as useLayoutEffect18,
|
|
15605
|
+
useMemo as useMemo42,
|
|
15409
15606
|
useRef as useRef28
|
|
15410
15607
|
} from "react";
|
|
15411
15608
|
|
|
@@ -15534,7 +15731,7 @@ var seekToTimeMultipleUntilRight = ({
|
|
|
15534
15731
|
};
|
|
15535
15732
|
|
|
15536
15733
|
// src/video/VideoForRendering.tsx
|
|
15537
|
-
import { jsx as
|
|
15734
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
15538
15735
|
var VideoForRenderingForwardFunction = ({
|
|
15539
15736
|
onError,
|
|
15540
15737
|
volume: volumeProp,
|
|
@@ -15557,15 +15754,15 @@ var VideoForRenderingForwardFunction = ({
|
|
|
15557
15754
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15558
15755
|
const videoConfig = useUnsafeVideoConfig();
|
|
15559
15756
|
const videoRef = useRef28(null);
|
|
15560
|
-
const sequenceContext =
|
|
15757
|
+
const sequenceContext = useContext46(SequenceContext);
|
|
15561
15758
|
const sequencePlaybackRate = sequenceContext?.playbackRate ?? 1;
|
|
15562
|
-
const audioStartFrame =
|
|
15759
|
+
const audioStartFrame = useContext46(Html5MediaTrimContext);
|
|
15563
15760
|
const environment = useRemotionEnvironment();
|
|
15564
15761
|
const logLevel = useLogLevel();
|
|
15565
15762
|
const mountTime = useMountTime();
|
|
15566
15763
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
15567
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
15568
|
-
const id =
|
|
15764
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext46(RenderAssetManager);
|
|
15765
|
+
const id = useMemo42(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
15569
15766
|
props2.src,
|
|
15570
15767
|
sequenceContext?.cumulatedFrom,
|
|
15571
15768
|
sequenceContext?.relativeFrom,
|
|
@@ -15715,7 +15912,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
15715
15912
|
]);
|
|
15716
15913
|
const { src } = props2;
|
|
15717
15914
|
if (environment.isRendering) {
|
|
15718
|
-
|
|
15915
|
+
useLayoutEffect18(() => {
|
|
15719
15916
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
15720
15917
|
return;
|
|
15721
15918
|
}
|
|
@@ -15749,7 +15946,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
15749
15946
|
delayRender2
|
|
15750
15947
|
]);
|
|
15751
15948
|
}
|
|
15752
|
-
return /* @__PURE__ */
|
|
15949
|
+
return /* @__PURE__ */ jsx40("video", {
|
|
15753
15950
|
ref: videoRef,
|
|
15754
15951
|
disableRemotePlayback: true,
|
|
15755
15952
|
...props2
|
|
@@ -15758,7 +15955,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
15758
15955
|
var VideoForRendering = forwardRef15(VideoForRenderingForwardFunction);
|
|
15759
15956
|
|
|
15760
15957
|
// src/video/html5-video.tsx
|
|
15761
|
-
import { jsx as
|
|
15958
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
15762
15959
|
var VideoForwardingFunction = (props2, ref) => {
|
|
15763
15960
|
const {
|
|
15764
15961
|
startFrom,
|
|
@@ -15782,7 +15979,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
15782
15979
|
if (environment.isClientSideRendering) {
|
|
15783
15980
|
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");
|
|
15784
15981
|
}
|
|
15785
|
-
const { durations, setDurations } =
|
|
15982
|
+
const { durations, setDurations } = useContext47(DurationsContext);
|
|
15786
15983
|
if (typeof ref === "string") {
|
|
15787
15984
|
throw new Error("string refs are not supported");
|
|
15788
15985
|
}
|
|
@@ -15815,14 +16012,14 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
15815
16012
|
const loopDuration = effectiveTrimAfter ?? (durationFetched === undefined ? undefined : durationFetched * fps);
|
|
15816
16013
|
if (loop && loopDuration !== undefined) {
|
|
15817
16014
|
if (!Number.isFinite(loopDuration)) {
|
|
15818
|
-
return /* @__PURE__ */
|
|
16015
|
+
return /* @__PURE__ */ jsx41(Html5Video, {
|
|
15819
16016
|
...propsOtherThanLoop,
|
|
15820
16017
|
ref,
|
|
15821
16018
|
_remotionInternalStack,
|
|
15822
16019
|
_remotionInternalNativeLoopPassed: true
|
|
15823
16020
|
});
|
|
15824
16021
|
}
|
|
15825
|
-
return /* @__PURE__ */
|
|
16022
|
+
return /* @__PURE__ */ jsx41(Loop, {
|
|
15826
16023
|
durationInFrames: calculateMediaDuration({
|
|
15827
16024
|
trimAfter: effectiveTrimAfter,
|
|
15828
16025
|
mediaDurationInFrames: loopDuration,
|
|
@@ -15832,7 +16029,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
15832
16029
|
layout: "none",
|
|
15833
16030
|
name,
|
|
15834
16031
|
showInTimeline: false,
|
|
15835
|
-
children: /* @__PURE__ */
|
|
16032
|
+
children: /* @__PURE__ */ jsx41(Html5Video, {
|
|
15836
16033
|
...propsOtherThanLoop,
|
|
15837
16034
|
ref,
|
|
15838
16035
|
_remotionInternalStack,
|
|
@@ -15841,19 +16038,20 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
15841
16038
|
});
|
|
15842
16039
|
}
|
|
15843
16040
|
if (typeof trimBeforeValue !== "undefined" || typeof effectiveTrimAfter !== "undefined") {
|
|
15844
|
-
return /* @__PURE__ */
|
|
16041
|
+
return /* @__PURE__ */ jsx41(Html5MediaTrimContext.Provider, {
|
|
15845
16042
|
value: trimBeforeValue ?? 0,
|
|
15846
|
-
children: /* @__PURE__ */
|
|
16043
|
+
children: /* @__PURE__ */ jsx41(Sequence, {
|
|
15847
16044
|
layout: "none",
|
|
15848
16045
|
from: 0 - (trimBeforeValue ?? 0),
|
|
15849
16046
|
showInTimeline: false,
|
|
15850
16047
|
durationInFrames: effectiveTrimAfter === undefined ? undefined : (trimBeforeValue ?? 0) + (effectiveTrimAfter - (trimBeforeValue ?? 0)) / (props2.playbackRate ?? 1),
|
|
15851
16048
|
name,
|
|
15852
|
-
children: /* @__PURE__ */
|
|
16049
|
+
children: /* @__PURE__ */ jsx41(Html5Video, {
|
|
15853
16050
|
pauseWhenBuffering: shouldPauseWhenBuffering,
|
|
15854
16051
|
onVideoFrame,
|
|
15855
16052
|
...otherProps,
|
|
15856
16053
|
ref,
|
|
16054
|
+
showInTimeline,
|
|
15857
16055
|
_remotionInternalStack
|
|
15858
16056
|
})
|
|
15859
16057
|
})
|
|
@@ -15865,14 +16063,14 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
15865
16063
|
volume: props2.volume
|
|
15866
16064
|
}, "Html5Video");
|
|
15867
16065
|
if (environment.isRendering) {
|
|
15868
|
-
return /* @__PURE__ */
|
|
16066
|
+
return /* @__PURE__ */ jsx41(VideoForRendering, {
|
|
15869
16067
|
onDuration,
|
|
15870
16068
|
onVideoFrame: onVideoFrame ?? null,
|
|
15871
16069
|
...otherProps,
|
|
15872
16070
|
ref
|
|
15873
16071
|
});
|
|
15874
16072
|
}
|
|
15875
|
-
return /* @__PURE__ */
|
|
16073
|
+
return /* @__PURE__ */ jsx41(VideoForPreview, {
|
|
15876
16074
|
onlyWarnForMediaSeekingError: false,
|
|
15877
16075
|
...otherProps,
|
|
15878
16076
|
ref,
|
|
@@ -15952,6 +16150,7 @@ export {
|
|
|
15952
16150
|
absoluteFillSchema,
|
|
15953
16151
|
Video,
|
|
15954
16152
|
VERSION,
|
|
16153
|
+
Track,
|
|
15955
16154
|
Still,
|
|
15956
16155
|
Solid,
|
|
15957
16156
|
Series,
|