@remotion/promo-pages 4.0.476 → 4.0.477
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/Homepage.js +984 -587
- package/dist/components/Homepage.js +3 -3
- package/dist/components/homepage/CommunityStatsItems.js +1 -1
- package/dist/components/homepage/Demo/Comp.js +1 -1
- package/dist/components/homepage/Demo/DownloadNudge.js +2 -2
- package/dist/components/homepage/Demo/DragAndDropNudge.js +1 -1
- package/dist/components/homepage/Demo/ThemeNudge.js +6 -6
- package/dist/components/homepage/Demo/index.js +9 -9
- package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
- package/dist/components/homepage/EditorStarterSection.js +8 -0
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/VideoAppsShowcase.d.ts +2 -1
- package/dist/components/homepage/VideoAppsShowcase.js +5 -5
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +591 -214
- package/dist/experts.js +130 -66
- package/dist/homepage/Pricing.js +585 -208
- package/dist/prompts/PromptsGallery.js +587 -210
- package/dist/prompts/PromptsShow.js +591 -214
- package/dist/prompts/PromptsSubmit.js +593 -216
- package/dist/team.js +583 -206
- package/dist/template-modal-content.js +590 -213
- package/dist/templates.js +583 -206
- package/package.json +13 -13
package/dist/experts.js
CHANGED
|
@@ -943,6 +943,7 @@ import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
|
943
943
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
944
944
|
import {
|
|
945
945
|
forwardRef as forwardRef3,
|
|
946
|
+
useCallback as useCallback6,
|
|
946
947
|
useContext as useContext17,
|
|
947
948
|
useEffect as useEffect3,
|
|
948
949
|
useMemo as useMemo14,
|
|
@@ -981,14 +982,14 @@ import {
|
|
|
981
982
|
useRef as useRef9,
|
|
982
983
|
useState as useState6
|
|
983
984
|
} from "react";
|
|
984
|
-
import React15, { useCallback as
|
|
985
|
+
import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
985
986
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
986
987
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
987
988
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
988
989
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
989
990
|
import {
|
|
990
991
|
createContext as createContext17,
|
|
991
|
-
useCallback as
|
|
992
|
+
useCallback as useCallback8,
|
|
992
993
|
useImperativeHandle as useImperativeHandle3,
|
|
993
994
|
useLayoutEffect as useLayoutEffect3,
|
|
994
995
|
useMemo as useMemo17,
|
|
@@ -996,7 +997,7 @@ import {
|
|
|
996
997
|
useState as useState7
|
|
997
998
|
} from "react";
|
|
998
999
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
999
|
-
import { forwardRef as forwardRef7, useCallback as
|
|
1000
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
1000
1001
|
import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
1001
1002
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1002
1003
|
import { useContext as useContext19 } from "react";
|
|
@@ -1004,7 +1005,7 @@ import { createContext as createContext19, useEffect as useEffect6, useState as
|
|
|
1004
1005
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1005
1006
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
1006
1007
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1007
|
-
import { useCallback as
|
|
1008
|
+
import { useCallback as useCallback13 } from "react";
|
|
1008
1009
|
import React22, {
|
|
1009
1010
|
forwardRef as forwardRef5,
|
|
1010
1011
|
useContext as useContext28,
|
|
@@ -1018,7 +1019,7 @@ import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef
|
|
|
1018
1019
|
import React19, {
|
|
1019
1020
|
createContext as createContext21,
|
|
1020
1021
|
createRef as createRef2,
|
|
1021
|
-
useCallback as
|
|
1022
|
+
useCallback as useCallback9,
|
|
1022
1023
|
useContext as useContext20,
|
|
1023
1024
|
useEffect as useEffect7,
|
|
1024
1025
|
useMemo as useMemo21,
|
|
@@ -1031,16 +1032,16 @@ import { useRef as useRef13 } from "react";
|
|
|
1031
1032
|
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo22, useState as useState11 } from "react";
|
|
1032
1033
|
import { useContext as useContext22 } from "react";
|
|
1033
1034
|
import {
|
|
1034
|
-
useCallback as
|
|
1035
|
+
useCallback as useCallback12,
|
|
1035
1036
|
useContext as useContext26,
|
|
1036
1037
|
useEffect as useEffect12,
|
|
1037
1038
|
useLayoutEffect as useLayoutEffect7,
|
|
1038
1039
|
useRef as useRef18
|
|
1039
1040
|
} from "react";
|
|
1040
|
-
import { useCallback as
|
|
1041
|
+
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
1041
1042
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
1042
1043
|
import React20, {
|
|
1043
|
-
useCallback as
|
|
1044
|
+
useCallback as useCallback10,
|
|
1044
1045
|
useContext as useContext24,
|
|
1045
1046
|
useEffect as useEffect9,
|
|
1046
1047
|
useLayoutEffect as useLayoutEffect6,
|
|
@@ -1068,7 +1069,7 @@ import { jsx as jsx222 } from "react/jsx-runtime";
|
|
|
1068
1069
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1069
1070
|
import {
|
|
1070
1071
|
forwardRef as forwardRef8,
|
|
1071
|
-
useCallback as
|
|
1072
|
+
useCallback as useCallback15,
|
|
1072
1073
|
useEffect as useEffect16,
|
|
1073
1074
|
useImperativeHandle as useImperativeHandle6,
|
|
1074
1075
|
useMemo as useMemo29,
|
|
@@ -1079,7 +1080,7 @@ import { jsx as jsx24 } from "react/jsx-runtime";
|
|
|
1079
1080
|
import {
|
|
1080
1081
|
createContext as createContext23,
|
|
1081
1082
|
forwardRef as forwardRef9,
|
|
1082
|
-
useCallback as
|
|
1083
|
+
useCallback as useCallback16,
|
|
1083
1084
|
useContext as useContext31,
|
|
1084
1085
|
useLayoutEffect as useLayoutEffect9,
|
|
1085
1086
|
useMemo as useMemo30,
|
|
@@ -1088,7 +1089,7 @@ import {
|
|
|
1088
1089
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1089
1090
|
import {
|
|
1090
1091
|
forwardRef as forwardRef10,
|
|
1091
|
-
useCallback as
|
|
1092
|
+
useCallback as useCallback17,
|
|
1092
1093
|
useContext as useContext32,
|
|
1093
1094
|
useEffect as useEffect17,
|
|
1094
1095
|
useImperativeHandle as useImperativeHandle7,
|
|
@@ -1097,16 +1098,16 @@ import {
|
|
|
1097
1098
|
useState as useState16
|
|
1098
1099
|
} from "react";
|
|
1099
1100
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1100
|
-
import { forwardRef as forwardRef11, useCallback as
|
|
1101
|
+
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
1101
1102
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1102
|
-
import { useCallback as
|
|
1103
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
|
|
1103
1104
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1104
|
-
import React29, { forwardRef as forwardRef12, useCallback as
|
|
1105
|
+
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
1105
1106
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1106
1107
|
import { createRef as createRef3 } from "react";
|
|
1107
1108
|
import React30 from "react";
|
|
1108
1109
|
import {
|
|
1109
|
-
useCallback as
|
|
1110
|
+
useCallback as useCallback21,
|
|
1110
1111
|
useImperativeHandle as useImperativeHandle8,
|
|
1111
1112
|
useMemo as useMemo32,
|
|
1112
1113
|
useRef as useRef26,
|
|
@@ -1121,9 +1122,9 @@ import { jsx as jsx32 } from "react/jsx-runtime";
|
|
|
1121
1122
|
import React33 from "react";
|
|
1122
1123
|
import React34, { createContext as createContext25 } from "react";
|
|
1123
1124
|
import React35, { useContext as useContext35 } from "react";
|
|
1124
|
-
import { useCallback as
|
|
1125
|
+
import { useCallback as useCallback24 } from "react";
|
|
1125
1126
|
import {
|
|
1126
|
-
useCallback as
|
|
1127
|
+
useCallback as useCallback22,
|
|
1127
1128
|
useContext as useContext36,
|
|
1128
1129
|
useEffect as useEffect18,
|
|
1129
1130
|
useLayoutEffect as useLayoutEffect11,
|
|
@@ -1133,7 +1134,7 @@ import {
|
|
|
1133
1134
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1134
1135
|
import React37, {
|
|
1135
1136
|
forwardRef as forwardRef13,
|
|
1136
|
-
useCallback as
|
|
1137
|
+
useCallback as useCallback23,
|
|
1137
1138
|
useContext as useContext37,
|
|
1138
1139
|
useEffect as useEffect20,
|
|
1139
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
@@ -1154,7 +1155,7 @@ import {
|
|
|
1154
1155
|
import React40 from "react";
|
|
1155
1156
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1156
1157
|
import React42 from "react";
|
|
1157
|
-
import { forwardRef as forwardRef16, useCallback as
|
|
1158
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
1158
1159
|
import {
|
|
1159
1160
|
forwardRef as forwardRef15,
|
|
1160
1161
|
useContext as useContext38,
|
|
@@ -2334,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2334
2335
|
var addSequenceStackTraces = (component) => {
|
|
2335
2336
|
componentsToAddStacksTo.push(component);
|
|
2336
2337
|
};
|
|
2337
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.477";
|
|
2338
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2339
2340
|
if (typeof globalThis === "undefined") {
|
|
2340
2341
|
return;
|
|
@@ -2793,10 +2794,17 @@ var fromField = {
|
|
|
2793
2794
|
step: 1,
|
|
2794
2795
|
hiddenFromList: true
|
|
2795
2796
|
};
|
|
2797
|
+
var freezeField = {
|
|
2798
|
+
type: "number",
|
|
2799
|
+
default: null,
|
|
2800
|
+
step: 1,
|
|
2801
|
+
hiddenFromList: true
|
|
2802
|
+
};
|
|
2796
2803
|
var sequenceSchema = extendSchemaWithSequenceName({
|
|
2797
2804
|
hidden: hiddenField,
|
|
2798
2805
|
showInTimeline: showInTimelineField,
|
|
2799
2806
|
from: fromField,
|
|
2807
|
+
freeze: freezeField,
|
|
2800
2808
|
durationInFrames: durationInFramesField,
|
|
2801
2809
|
layout: {
|
|
2802
2810
|
type: "enum",
|
|
@@ -2811,6 +2819,7 @@ var sequenceSchema = extendSchemaWithSequenceName({
|
|
|
2811
2819
|
var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
|
|
2812
2820
|
hidden: hiddenField,
|
|
2813
2821
|
showInTimeline: showInTimelineField,
|
|
2822
|
+
freeze: freezeField,
|
|
2814
2823
|
durationInFrames: durationInFramesField,
|
|
2815
2824
|
layout: sequenceSchema.layout
|
|
2816
2825
|
});
|
|
@@ -5002,6 +5011,7 @@ var mergeValues = ({
|
|
|
5002
5011
|
var stackToOverrideMap = {};
|
|
5003
5012
|
var wrapInSchema = ({
|
|
5004
5013
|
Component,
|
|
5014
|
+
componentIdentity,
|
|
5005
5015
|
schema,
|
|
5006
5016
|
supportsEffects
|
|
5007
5017
|
}) => {
|
|
@@ -5048,7 +5058,8 @@ var wrapInSchema = ({
|
|
|
5048
5058
|
schema: schemaWithSequenceName,
|
|
5049
5059
|
currentRuntimeValueDotNotation,
|
|
5050
5060
|
overrideId,
|
|
5051
|
-
supportsEffects
|
|
5061
|
+
supportsEffects,
|
|
5062
|
+
componentIdentity
|
|
5052
5063
|
};
|
|
5053
5064
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5054
5065
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
@@ -5085,6 +5096,7 @@ var wrapInSchema = ({
|
|
|
5085
5096
|
var EMPTY_EFFECTS = [];
|
|
5086
5097
|
var RegularSequenceRefForwardingFunction = ({
|
|
5087
5098
|
from = 0,
|
|
5099
|
+
freeze,
|
|
5088
5100
|
durationInFrames = Infinity,
|
|
5089
5101
|
children,
|
|
5090
5102
|
name,
|
|
@@ -5100,7 +5112,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5100
5112
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
5101
5113
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
5102
5114
|
_remotionInternalIsMedia: isMedia,
|
|
5103
|
-
_remotionInternalRefForOutline:
|
|
5115
|
+
_remotionInternalRefForOutline: passedRefForOutline,
|
|
5104
5116
|
...other
|
|
5105
5117
|
}, ref) => {
|
|
5106
5118
|
const { layout = "absolute-fill" } = other;
|
|
@@ -5128,11 +5140,24 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5128
5140
|
if (!Number.isFinite(from)) {
|
|
5129
5141
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
5130
5142
|
}
|
|
5143
|
+
if (typeof freeze !== "undefined" && freeze !== null) {
|
|
5144
|
+
if (typeof freeze !== "number") {
|
|
5145
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
5146
|
+
}
|
|
5147
|
+
if (Number.isNaN(freeze)) {
|
|
5148
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`);
|
|
5149
|
+
}
|
|
5150
|
+
if (!Number.isFinite(freeze)) {
|
|
5151
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`);
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5131
5154
|
const absoluteFrame = useTimelinePosition();
|
|
5132
5155
|
const videoConfig = useVideoConfig();
|
|
5133
5156
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
5134
5157
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
5135
5158
|
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
5159
|
+
const wrapperRefForOutline = useRef6(null);
|
|
5160
|
+
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
5136
5161
|
const premounting = useMemo14(() => {
|
|
5137
5162
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
5138
5163
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
@@ -5291,7 +5316,19 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5291
5316
|
]);
|
|
5292
5317
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
5293
5318
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
5319
|
+
const frozenContent = content === null || typeof freeze === "undefined" || freeze === null ? content : /* @__PURE__ */ jsx12(Freeze, {
|
|
5320
|
+
frame: freeze,
|
|
5321
|
+
children: content
|
|
5322
|
+
});
|
|
5294
5323
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
5324
|
+
const sequenceRef = useCallback6((node) => {
|
|
5325
|
+
wrapperRefForOutline.current = node;
|
|
5326
|
+
if (typeof ref === "function") {
|
|
5327
|
+
ref(node);
|
|
5328
|
+
} else if (ref) {
|
|
5329
|
+
ref.current = node;
|
|
5330
|
+
}
|
|
5331
|
+
}, [ref]);
|
|
5295
5332
|
const defaultStyle = useMemo14(() => {
|
|
5296
5333
|
return {
|
|
5297
5334
|
flexDirection: undefined,
|
|
@@ -5308,11 +5345,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5308
5345
|
}
|
|
5309
5346
|
return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
|
|
5310
5347
|
value: contextValue,
|
|
5311
|
-
children:
|
|
5312
|
-
ref,
|
|
5348
|
+
children: frozenContent === null ? null : other.layout === "none" ? frozenContent : /* @__PURE__ */ jsx12(AbsoluteFill, {
|
|
5349
|
+
ref: sequenceRef,
|
|
5313
5350
|
style: defaultStyle,
|
|
5314
5351
|
className: other.className,
|
|
5315
|
-
children:
|
|
5352
|
+
children: frozenContent
|
|
5316
5353
|
})
|
|
5317
5354
|
});
|
|
5318
5355
|
};
|
|
@@ -5392,11 +5429,13 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
|
5392
5429
|
var SequenceWithoutSchema = SequenceInner;
|
|
5393
5430
|
var Sequence = wrapInSchema({
|
|
5394
5431
|
Component: SequenceInner,
|
|
5432
|
+
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
5395
5433
|
schema: sequenceSchema,
|
|
5396
5434
|
supportsEffects: false
|
|
5397
5435
|
});
|
|
5398
5436
|
var SequenceWithoutFrom = wrapInSchema({
|
|
5399
5437
|
Component: SequenceInner,
|
|
5438
|
+
componentIdentity: null,
|
|
5400
5439
|
schema: sequenceSchemaWithoutFrom,
|
|
5401
5440
|
supportsEffects: false
|
|
5402
5441
|
});
|
|
@@ -5714,7 +5753,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
5714
5753
|
}
|
|
5715
5754
|
return document.createElement("canvas");
|
|
5716
5755
|
}, []);
|
|
5717
|
-
const draw =
|
|
5756
|
+
const draw = useCallback7((imageData) => {
|
|
5718
5757
|
const canvas = canvasRef.current;
|
|
5719
5758
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
5720
5759
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -5935,6 +5974,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
5935
5974
|
var animatedImageSchema = {
|
|
5936
5975
|
durationInFrames: durationInFramesField,
|
|
5937
5976
|
from: fromField,
|
|
5977
|
+
freeze: freezeField,
|
|
5938
5978
|
playbackRate: {
|
|
5939
5979
|
type: "number",
|
|
5940
5980
|
min: 0,
|
|
@@ -6134,6 +6174,7 @@ var AnimatedImageInner = ({
|
|
|
6134
6174
|
};
|
|
6135
6175
|
var AnimatedImage = wrapInSchema({
|
|
6136
6176
|
Component: AnimatedImageInner,
|
|
6177
|
+
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
6137
6178
|
schema: animatedImageSchema,
|
|
6138
6179
|
supportsEffects: true
|
|
6139
6180
|
});
|
|
@@ -6180,7 +6221,7 @@ var RenderAssetManager = createContext17({
|
|
|
6180
6221
|
var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
6181
6222
|
const [renderAssets, setRenderAssets] = useState7([]);
|
|
6182
6223
|
const renderAssetsRef = useRef10([]);
|
|
6183
|
-
const registerRenderAsset =
|
|
6224
|
+
const registerRenderAsset = useCallback8((renderAsset) => {
|
|
6184
6225
|
validateRenderAsset(renderAsset);
|
|
6185
6226
|
renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
|
|
6186
6227
|
setRenderAssets(renderAssetsRef.current);
|
|
@@ -6197,7 +6238,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6197
6238
|
};
|
|
6198
6239
|
}, []);
|
|
6199
6240
|
}
|
|
6200
|
-
const unregisterRenderAsset =
|
|
6241
|
+
const unregisterRenderAsset = useCallback8((id) => {
|
|
6201
6242
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
6202
6243
|
setRenderAssets(renderAssetsRef.current);
|
|
6203
6244
|
}, []);
|
|
@@ -7002,7 +7043,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7002
7043
|
}, []);
|
|
7003
7044
|
const prevEndTimes = useRef12({ scheduledEndTime: null, mediaEndTime: null });
|
|
7004
7045
|
const nodesToResume = useRef12(new Map);
|
|
7005
|
-
const unscheduleAudioNode =
|
|
7046
|
+
const unscheduleAudioNode = useCallback9((node) => {
|
|
7006
7047
|
nodesToResume.current.delete(node);
|
|
7007
7048
|
}, []);
|
|
7008
7049
|
const scheduleAudioNode = useMemo21(() => {
|
|
@@ -7056,7 +7097,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7056
7097
|
};
|
|
7057
7098
|
};
|
|
7058
7099
|
}, [ctxAndGain, logLevel]);
|
|
7059
|
-
const resume =
|
|
7100
|
+
const resume = useCallback9(() => {
|
|
7060
7101
|
if (!ctxAndGain) {
|
|
7061
7102
|
return Promise.resolve();
|
|
7062
7103
|
}
|
|
@@ -7083,10 +7124,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7083
7124
|
});
|
|
7084
7125
|
return resumePromise.catch(() => {});
|
|
7085
7126
|
}, [ctxAndGain, logLevel]);
|
|
7086
|
-
const getIsResumingAudioContext =
|
|
7127
|
+
const getIsResumingAudioContext = useCallback9(() => {
|
|
7087
7128
|
return isResuming.current;
|
|
7088
7129
|
}, []);
|
|
7089
|
-
const suspend =
|
|
7130
|
+
const suspend = useCallback9(() => {
|
|
7090
7131
|
if (!ctxAndGain) {
|
|
7091
7132
|
return Promise.resolve();
|
|
7092
7133
|
}
|
|
@@ -7160,7 +7201,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7160
7201
|
};
|
|
7161
7202
|
}, [refs]);
|
|
7162
7203
|
const takenAudios = useRef12(new Array(numberOfAudioTags).fill(false));
|
|
7163
|
-
const rerenderAudios =
|
|
7204
|
+
const rerenderAudios = useCallback9(() => {
|
|
7164
7205
|
refs.forEach(({ ref, id }) => {
|
|
7165
7206
|
const data = audios.current?.find((a2) => a2.id === id);
|
|
7166
7207
|
const { current } = ref;
|
|
@@ -7181,7 +7222,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7181
7222
|
});
|
|
7182
7223
|
});
|
|
7183
7224
|
}, [refs]);
|
|
7184
|
-
const registerAudio =
|
|
7225
|
+
const registerAudio = useCallback9((options) => {
|
|
7185
7226
|
const { aud, audioId, premounting, postmounting } = options;
|
|
7186
7227
|
const found = audios.current?.find((a2) => a2.audioId === audioId);
|
|
7187
7228
|
if (found) {
|
|
@@ -7210,7 +7251,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7210
7251
|
rerenderAudios();
|
|
7211
7252
|
return newElem;
|
|
7212
7253
|
}, [numberOfAudioTags, refs, rerenderAudios]);
|
|
7213
|
-
const unregisterAudio =
|
|
7254
|
+
const unregisterAudio = useCallback9((id) => {
|
|
7214
7255
|
const cloned = [...takenAudios.current];
|
|
7215
7256
|
const index = refs.findIndex((r) => r.id === id);
|
|
7216
7257
|
if (index === -1) {
|
|
@@ -7221,7 +7262,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7221
7262
|
audios.current = audios.current?.filter((a2) => a2.id !== id);
|
|
7222
7263
|
rerenderAudios();
|
|
7223
7264
|
}, [refs, rerenderAudios]);
|
|
7224
|
-
const updateAudio =
|
|
7265
|
+
const updateAudio = useCallback9(({
|
|
7225
7266
|
aud,
|
|
7226
7267
|
audioId,
|
|
7227
7268
|
id,
|
|
@@ -7255,7 +7296,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7255
7296
|
rerenderAudios();
|
|
7256
7297
|
}
|
|
7257
7298
|
}, [rerenderAudios]);
|
|
7258
|
-
const playAllAudios =
|
|
7299
|
+
const playAllAudios = useCallback9(() => {
|
|
7259
7300
|
refs.forEach((ref) => {
|
|
7260
7301
|
const audio = audios.current.find((a2) => a2.el === ref.ref);
|
|
7261
7302
|
if (audio?.premounting) {
|
|
@@ -7803,7 +7844,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7803
7844
|
const env = useRemotionEnvironment();
|
|
7804
7845
|
const rendering = env.isRendering;
|
|
7805
7846
|
const buffering = useRef15(false);
|
|
7806
|
-
const addBlock =
|
|
7847
|
+
const addBlock = useCallback10((block) => {
|
|
7807
7848
|
if (rendering) {
|
|
7808
7849
|
return {
|
|
7809
7850
|
unblock: () => {
|
|
@@ -7829,7 +7870,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7829
7870
|
}
|
|
7830
7871
|
};
|
|
7831
7872
|
}, [rendering]);
|
|
7832
|
-
const listenForBuffering =
|
|
7873
|
+
const listenForBuffering = useCallback10((callback) => {
|
|
7833
7874
|
setOnBufferingCallbacks((c2) => [...c2, callback]);
|
|
7834
7875
|
return {
|
|
7835
7876
|
remove: () => {
|
|
@@ -7837,7 +7878,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7837
7878
|
}
|
|
7838
7879
|
};
|
|
7839
7880
|
}, []);
|
|
7840
|
-
const listenForResume =
|
|
7881
|
+
const listenForResume = useCallback10((callback) => {
|
|
7841
7882
|
setOnResumeCallbacks((c2) => [...c2, callback]);
|
|
7842
7883
|
return {
|
|
7843
7884
|
remove: () => {
|
|
@@ -7951,7 +7992,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
7951
7992
|
}) => {
|
|
7952
7993
|
const bufferingRef = useRef16(false);
|
|
7953
7994
|
const { delayPlayback } = useBufferState();
|
|
7954
|
-
const bufferUntilFirstFrame =
|
|
7995
|
+
const bufferUntilFirstFrame = useCallback11((requestedTime) => {
|
|
7955
7996
|
if (mediaType !== "video") {
|
|
7956
7997
|
return;
|
|
7957
7998
|
}
|
|
@@ -8341,7 +8382,7 @@ var useMediaPlayback = ({
|
|
|
8341
8382
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
8342
8383
|
}
|
|
8343
8384
|
const isVariableFpsVideoMap = useRef18({});
|
|
8344
|
-
const onVariableFpsVideoDetected =
|
|
8385
|
+
const onVariableFpsVideoDetected = useCallback12(() => {
|
|
8345
8386
|
if (!src) {
|
|
8346
8387
|
return;
|
|
8347
8388
|
}
|
|
@@ -8732,7 +8773,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8732
8773
|
premounting: Boolean(sequenceContext?.premounting),
|
|
8733
8774
|
postmounting: Boolean(sequenceContext?.postmounting)
|
|
8734
8775
|
});
|
|
8735
|
-
const getStack =
|
|
8776
|
+
const getStack = useCallback13(() => {
|
|
8736
8777
|
return _remotionInternalStack ?? null;
|
|
8737
8778
|
}, [_remotionInternalStack]);
|
|
8738
8779
|
useMediaInTimeline({
|
|
@@ -8978,7 +9019,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
8978
9019
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
8979
9020
|
}
|
|
8980
9021
|
const preloadedSrc = usePreload(props.src);
|
|
8981
|
-
const onError =
|
|
9022
|
+
const onError = useCallback14((e) => {
|
|
8982
9023
|
console.log(e.currentTarget.error);
|
|
8983
9024
|
const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
|
|
8984
9025
|
if (loop) {
|
|
@@ -8992,7 +9033,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
8992
9033
|
console.warn(errMessage);
|
|
8993
9034
|
}
|
|
8994
9035
|
}, [loop, onRemotionError, preloadedSrc]);
|
|
8995
|
-
const onDuration =
|
|
9036
|
+
const onDuration = useCallback14((src, durationInSeconds) => {
|
|
8996
9037
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
8997
9038
|
}, [setDurations]);
|
|
8998
9039
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
|
|
@@ -9084,6 +9125,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
9084
9125
|
var solidSchema = {
|
|
9085
9126
|
durationInFrames: durationInFramesField,
|
|
9086
9127
|
from: fromField,
|
|
9128
|
+
freeze: freezeField,
|
|
9087
9129
|
color: {
|
|
9088
9130
|
type: "color",
|
|
9089
9131
|
default: "transparent",
|
|
@@ -9138,7 +9180,7 @@ var SolidInner = ({
|
|
|
9138
9180
|
return canvas;
|
|
9139
9181
|
}, []);
|
|
9140
9182
|
const chainState = useEffectChainState();
|
|
9141
|
-
const canvasRef =
|
|
9183
|
+
const canvasRef = useCallback15((canvas) => {
|
|
9142
9184
|
setOutputCanvas(canvas);
|
|
9143
9185
|
if (typeof reference === "function") {
|
|
9144
9186
|
reference(canvas);
|
|
@@ -9222,6 +9264,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9222
9264
|
style,
|
|
9223
9265
|
name,
|
|
9224
9266
|
from,
|
|
9267
|
+
freeze,
|
|
9225
9268
|
hidden,
|
|
9226
9269
|
showInTimeline,
|
|
9227
9270
|
pixelDensity,
|
|
@@ -9235,6 +9278,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9235
9278
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
9236
9279
|
layout: "none",
|
|
9237
9280
|
from,
|
|
9281
|
+
freeze,
|
|
9238
9282
|
hidden,
|
|
9239
9283
|
showInTimeline,
|
|
9240
9284
|
_experimentalControls: controls,
|
|
@@ -9259,6 +9303,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9259
9303
|
});
|
|
9260
9304
|
var Solid = wrapInSchema({
|
|
9261
9305
|
Component: SolidOuter,
|
|
9306
|
+
componentIdentity: "dev.remotion.remotion.Solid",
|
|
9262
9307
|
schema: solidSchema,
|
|
9263
9308
|
supportsEffects: true
|
|
9264
9309
|
});
|
|
@@ -9348,7 +9393,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9348
9393
|
const offscreenRef = useRef22(null);
|
|
9349
9394
|
const divRef = useRef22(null);
|
|
9350
9395
|
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
9351
|
-
const setLayoutCanvasRef =
|
|
9396
|
+
const setLayoutCanvasRef = useCallback16((node) => {
|
|
9352
9397
|
canvas2dRef.current = node;
|
|
9353
9398
|
if (typeof ref === "function") {
|
|
9354
9399
|
ref(node);
|
|
@@ -9370,7 +9415,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9370
9415
|
const initializedRef = useRef22(false);
|
|
9371
9416
|
const onInitCleanupRef = useRef22(null);
|
|
9372
9417
|
const unmountedRef = useRef22(false);
|
|
9373
|
-
const onPaintCb =
|
|
9418
|
+
const onPaintCb = useCallback16(async () => {
|
|
9374
9419
|
const element = divRef.current;
|
|
9375
9420
|
if (!element) {
|
|
9376
9421
|
throw new Error("Canvas or scene element not found");
|
|
@@ -9543,7 +9588,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9543
9588
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9544
9589
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9545
9590
|
const actualRef = useRef22(null);
|
|
9546
|
-
const setCanvasRef =
|
|
9591
|
+
const setCanvasRef = useCallback16((node) => {
|
|
9547
9592
|
actualRef.current = node;
|
|
9548
9593
|
if (typeof ref === "function") {
|
|
9549
9594
|
ref(node);
|
|
@@ -9578,11 +9623,13 @@ HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
|
9578
9623
|
var htmlInCanvasSchema = {
|
|
9579
9624
|
durationInFrames: durationInFramesField,
|
|
9580
9625
|
from: fromField,
|
|
9626
|
+
freeze: freezeField,
|
|
9581
9627
|
...sequenceVisualStyleSchema,
|
|
9582
9628
|
hidden: hiddenField
|
|
9583
9629
|
};
|
|
9584
9630
|
var HtmlInCanvasWrapped = wrapInSchema({
|
|
9585
9631
|
Component: HtmlInCanvasInner,
|
|
9632
|
+
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
9586
9633
|
schema: htmlInCanvasSchema,
|
|
9587
9634
|
supportsEffects: true
|
|
9588
9635
|
});
|
|
@@ -9600,6 +9647,7 @@ function truncateSrcForLabel(src) {
|
|
|
9600
9647
|
var canvasImageSchema = {
|
|
9601
9648
|
durationInFrames: durationInFramesField,
|
|
9602
9649
|
from: fromField,
|
|
9650
|
+
freeze: freezeField,
|
|
9603
9651
|
fit: {
|
|
9604
9652
|
type: "enum",
|
|
9605
9653
|
default: "fill",
|
|
@@ -9705,7 +9753,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
9705
9753
|
}
|
|
9706
9754
|
return document.createElement("canvas");
|
|
9707
9755
|
}, []);
|
|
9708
|
-
const canvasRef =
|
|
9756
|
+
const canvasRef = useCallback17((canvas) => {
|
|
9709
9757
|
setOutputCanvas(canvas);
|
|
9710
9758
|
if (refForOutline) {
|
|
9711
9759
|
refForOutline.current = canvas;
|
|
@@ -9852,6 +9900,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9852
9900
|
delayRenderTimeoutInMilliseconds,
|
|
9853
9901
|
durationInFrames,
|
|
9854
9902
|
from,
|
|
9903
|
+
freeze,
|
|
9855
9904
|
hidden,
|
|
9856
9905
|
name,
|
|
9857
9906
|
showInTimeline,
|
|
@@ -9873,6 +9922,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9873
9922
|
layout: "none",
|
|
9874
9923
|
from: from ?? 0,
|
|
9875
9924
|
durationInFrames: durationInFrames ?? Infinity,
|
|
9925
|
+
freeze,
|
|
9876
9926
|
hidden,
|
|
9877
9927
|
showInTimeline: showInTimeline ?? true,
|
|
9878
9928
|
name: name ?? "<CanvasImage>",
|
|
@@ -9905,6 +9955,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9905
9955
|
});
|
|
9906
9956
|
var CanvasImage = wrapInSchema({
|
|
9907
9957
|
Component: CanvasImageInner,
|
|
9958
|
+
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
9908
9959
|
schema: canvasImageSchema,
|
|
9909
9960
|
supportsEffects: true
|
|
9910
9961
|
});
|
|
@@ -9922,11 +9973,11 @@ var IFrameRefForwarding = ({
|
|
|
9922
9973
|
retries: delayRenderRetries ?? undefined,
|
|
9923
9974
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
9924
9975
|
}));
|
|
9925
|
-
const didLoad =
|
|
9976
|
+
const didLoad = useCallback18((e) => {
|
|
9926
9977
|
continueRender2(handle);
|
|
9927
9978
|
onLoad?.(e);
|
|
9928
9979
|
}, [handle, onLoad, continueRender2]);
|
|
9929
|
-
const didGetError =
|
|
9980
|
+
const didGetError = useCallback18((e) => {
|
|
9930
9981
|
continueRender2(handle);
|
|
9931
9982
|
if (onError) {
|
|
9932
9983
|
onError(e);
|
|
@@ -9968,7 +10019,7 @@ var ImgContent = ({
|
|
|
9968
10019
|
if (!_propsValid) {
|
|
9969
10020
|
throw new Error("typecheck error");
|
|
9970
10021
|
}
|
|
9971
|
-
const imageCallbackRef =
|
|
10022
|
+
const imageCallbackRef = useCallback19((img) => {
|
|
9972
10023
|
imageRef.current = img;
|
|
9973
10024
|
refForOutline.current = img;
|
|
9974
10025
|
if (typeof ref === "function") {
|
|
@@ -9978,7 +10029,7 @@ var ImgContent = ({
|
|
|
9978
10029
|
}
|
|
9979
10030
|
}, [ref, refForOutline]);
|
|
9980
10031
|
const actualSrc = usePreload(src);
|
|
9981
|
-
const retryIn =
|
|
10032
|
+
const retryIn = useCallback19((timeout) => {
|
|
9982
10033
|
if (!imageRef.current) {
|
|
9983
10034
|
return;
|
|
9984
10035
|
}
|
|
@@ -9996,7 +10047,7 @@ var ImgContent = ({
|
|
|
9996
10047
|
}, timeout);
|
|
9997
10048
|
}, []);
|
|
9998
10049
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
9999
|
-
const didGetError =
|
|
10050
|
+
const didGetError = useCallback19((e) => {
|
|
10000
10051
|
if (!errors.current) {
|
|
10001
10052
|
return;
|
|
10002
10053
|
}
|
|
@@ -10106,6 +10157,7 @@ var NativeImgInner = ({
|
|
|
10106
10157
|
src,
|
|
10107
10158
|
from,
|
|
10108
10159
|
durationInFrames,
|
|
10160
|
+
freeze,
|
|
10109
10161
|
_experimentalControls: controls,
|
|
10110
10162
|
_remotionInternalRefForOutline: refForOutline,
|
|
10111
10163
|
...props2
|
|
@@ -10117,6 +10169,7 @@ var NativeImgInner = ({
|
|
|
10117
10169
|
layout: "none",
|
|
10118
10170
|
from: from ?? 0,
|
|
10119
10171
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10172
|
+
freeze,
|
|
10120
10173
|
_remotionInternalStack: stack,
|
|
10121
10174
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
10122
10175
|
_remotionInternalIsMedia: { type: "image", src },
|
|
@@ -10136,6 +10189,7 @@ var CanvasImageWithPrivateProps = CanvasImage;
|
|
|
10136
10189
|
var imgSchema = {
|
|
10137
10190
|
durationInFrames: durationInFramesField,
|
|
10138
10191
|
from: fromField,
|
|
10192
|
+
freeze: freezeField,
|
|
10139
10193
|
...sequenceVisualStyleSchema,
|
|
10140
10194
|
hidden: hiddenField
|
|
10141
10195
|
};
|
|
@@ -10191,6 +10245,7 @@ var ImgInner = ({
|
|
|
10191
10245
|
src,
|
|
10192
10246
|
from,
|
|
10193
10247
|
durationInFrames,
|
|
10248
|
+
freeze,
|
|
10194
10249
|
_experimentalControls: controls,
|
|
10195
10250
|
width,
|
|
10196
10251
|
height,
|
|
@@ -10215,6 +10270,7 @@ var ImgInner = ({
|
|
|
10215
10270
|
src,
|
|
10216
10271
|
from,
|
|
10217
10272
|
durationInFrames,
|
|
10273
|
+
freeze,
|
|
10218
10274
|
_experimentalControls: controls,
|
|
10219
10275
|
width,
|
|
10220
10276
|
height,
|
|
@@ -10256,6 +10312,7 @@ var ImgInner = ({
|
|
|
10256
10312
|
delayRenderTimeoutInMilliseconds,
|
|
10257
10313
|
from,
|
|
10258
10314
|
durationInFrames,
|
|
10315
|
+
freeze,
|
|
10259
10316
|
hidden,
|
|
10260
10317
|
name: name ?? "<Img>",
|
|
10261
10318
|
showInTimeline,
|
|
@@ -10268,6 +10325,7 @@ var ImgInner = ({
|
|
|
10268
10325
|
};
|
|
10269
10326
|
var Img = wrapInSchema({
|
|
10270
10327
|
Component: ImgInner,
|
|
10328
|
+
componentIdentity: "dev.remotion.remotion.Img",
|
|
10271
10329
|
schema: imgSchema,
|
|
10272
10330
|
supportsEffects: true
|
|
10273
10331
|
});
|
|
@@ -10275,6 +10333,7 @@ addSequenceStackTraces(Img);
|
|
|
10275
10333
|
var interactiveElementSchema = {
|
|
10276
10334
|
durationInFrames: durationInFramesField,
|
|
10277
10335
|
from: fromField,
|
|
10336
|
+
freeze: freezeField,
|
|
10278
10337
|
...sequenceVisualStyleSchema,
|
|
10279
10338
|
hidden: hiddenField
|
|
10280
10339
|
};
|
|
@@ -10290,6 +10349,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10290
10349
|
const {
|
|
10291
10350
|
durationInFrames,
|
|
10292
10351
|
from,
|
|
10352
|
+
freeze,
|
|
10293
10353
|
hidden,
|
|
10294
10354
|
name,
|
|
10295
10355
|
showInTimeline,
|
|
@@ -10298,7 +10358,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10298
10358
|
...props2
|
|
10299
10359
|
} = propsWithControls;
|
|
10300
10360
|
const refForOutline = useRef25(null);
|
|
10301
|
-
const callbackRef =
|
|
10361
|
+
const callbackRef = useCallback20((element) => {
|
|
10302
10362
|
refForOutline.current = element;
|
|
10303
10363
|
setRef(ref, element);
|
|
10304
10364
|
}, [ref]);
|
|
@@ -10306,6 +10366,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10306
10366
|
layout: "none",
|
|
10307
10367
|
from: from ?? 0,
|
|
10308
10368
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10369
|
+
freeze,
|
|
10309
10370
|
hidden,
|
|
10310
10371
|
name: name ?? displayName,
|
|
10311
10372
|
showInTimeline: showInTimeline ?? true,
|
|
@@ -10322,6 +10383,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10322
10383
|
Inner.displayName = displayName;
|
|
10323
10384
|
const Wrapped = wrapInSchema({
|
|
10324
10385
|
Component: Inner,
|
|
10386
|
+
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
10325
10387
|
schema: interactiveElementSchema,
|
|
10326
10388
|
supportsEffects: false
|
|
10327
10389
|
});
|
|
@@ -10378,14 +10440,14 @@ var CompositionManagerProvider = ({
|
|
|
10378
10440
|
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
10379
10441
|
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
10380
10442
|
const currentcompositionsRef = useRef26(compositions);
|
|
10381
|
-
const updateCompositions =
|
|
10443
|
+
const updateCompositions = useCallback21((updateComps) => {
|
|
10382
10444
|
setCompositions((comps) => {
|
|
10383
10445
|
const updated = updateComps(comps);
|
|
10384
10446
|
currentcompositionsRef.current = updated;
|
|
10385
10447
|
return updated;
|
|
10386
10448
|
});
|
|
10387
10449
|
}, []);
|
|
10388
|
-
const registerComposition =
|
|
10450
|
+
const registerComposition = useCallback21((comp) => {
|
|
10389
10451
|
updateCompositions((comps) => {
|
|
10390
10452
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
10391
10453
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -10393,12 +10455,12 @@ var CompositionManagerProvider = ({
|
|
|
10393
10455
|
return [...comps, comp];
|
|
10394
10456
|
});
|
|
10395
10457
|
}, [updateCompositions]);
|
|
10396
|
-
const unregisterComposition =
|
|
10458
|
+
const unregisterComposition = useCallback21((id) => {
|
|
10397
10459
|
setCompositions((comps) => {
|
|
10398
10460
|
return comps.filter((c2) => c2.id !== id);
|
|
10399
10461
|
});
|
|
10400
10462
|
}, []);
|
|
10401
|
-
const registerFolder =
|
|
10463
|
+
const registerFolder = useCallback21((name, parent, nonce, stack) => {
|
|
10402
10464
|
setFolders((prevFolders) => {
|
|
10403
10465
|
return [
|
|
10404
10466
|
...prevFolders,
|
|
@@ -10411,7 +10473,7 @@ var CompositionManagerProvider = ({
|
|
|
10411
10473
|
];
|
|
10412
10474
|
});
|
|
10413
10475
|
}, []);
|
|
10414
|
-
const unregisterFolder =
|
|
10476
|
+
const unregisterFolder = useCallback21((name, parent) => {
|
|
10415
10477
|
setFolders((prevFolders) => {
|
|
10416
10478
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
10417
10479
|
});
|
|
@@ -11050,7 +11112,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11050
11112
|
continueRender2,
|
|
11051
11113
|
delayRender2
|
|
11052
11114
|
]);
|
|
11053
|
-
const onErr =
|
|
11115
|
+
const onErr = useCallback22(() => {
|
|
11054
11116
|
if (onError) {
|
|
11055
11117
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
11056
11118
|
} else {
|
|
@@ -11060,7 +11122,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11060
11122
|
const className = useMemo35(() => {
|
|
11061
11123
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
11062
11124
|
}, [props2.className]);
|
|
11063
|
-
const onImageFrame =
|
|
11125
|
+
const onImageFrame = useCallback22((img) => {
|
|
11064
11126
|
if (onVideoFrame) {
|
|
11065
11127
|
onVideoFrame(img);
|
|
11066
11128
|
}
|
|
@@ -11193,7 +11255,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11193
11255
|
mediaVolume
|
|
11194
11256
|
});
|
|
11195
11257
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
11196
|
-
const getStack =
|
|
11258
|
+
const getStack = useCallback23(() => {
|
|
11197
11259
|
return _remotionInternalStack ?? null;
|
|
11198
11260
|
}, [_remotionInternalStack]);
|
|
11199
11261
|
useMediaInTimeline({
|
|
@@ -11369,7 +11431,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
11369
11431
|
if (environment.isClientSideRendering) {
|
|
11370
11432
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
11371
11433
|
}
|
|
11372
|
-
const onDuration =
|
|
11434
|
+
const onDuration = useCallback24(() => {
|
|
11373
11435
|
return;
|
|
11374
11436
|
}, []);
|
|
11375
11437
|
if (typeof props2.src !== "string") {
|
|
@@ -11748,6 +11810,7 @@ var Internals = {
|
|
|
11748
11810
|
getEffectPropStatusesCtx,
|
|
11749
11811
|
hiddenField,
|
|
11750
11812
|
durationInFramesField,
|
|
11813
|
+
freezeField,
|
|
11751
11814
|
fromField
|
|
11752
11815
|
};
|
|
11753
11816
|
var flattenChildren = (children) => {
|
|
@@ -11833,6 +11896,7 @@ var SeriesInner = (props2) => {
|
|
|
11833
11896
|
};
|
|
11834
11897
|
var Series = Object.assign(wrapInSchema({
|
|
11835
11898
|
Component: SeriesInner,
|
|
11899
|
+
componentIdentity: "dev.remotion.remotion.Series",
|
|
11836
11900
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
11837
11901
|
supportsEffects: false
|
|
11838
11902
|
}), {
|
|
@@ -12297,7 +12361,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
12297
12361
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
12298
12362
|
}
|
|
12299
12363
|
const preloadedSrc = usePreload(props2.src);
|
|
12300
|
-
const onDuration =
|
|
12364
|
+
const onDuration = useCallback25((src, durationInSeconds) => {
|
|
12301
12365
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
12302
12366
|
}, [setDurations]);
|
|
12303
12367
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|