@remotion/promo-pages 4.0.493 → 4.0.495
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 +505 -362
- package/dist/design.js +294 -227
- package/dist/experts.js +291 -224
- package/dist/homepage/Pricing.js +301 -234
- package/dist/prompts/PromptsGallery.js +294 -227
- package/dist/prompts/PromptsShow.js +318 -251
- package/dist/prompts/PromptsSubmit.js +294 -227
- package/dist/team.js +294 -227
- package/dist/template-modal-content.js +296 -229
- package/dist/templates.js +294 -227
- package/package.json +13 -13
package/dist/Homepage.js
CHANGED
|
@@ -911,7 +911,7 @@ var experts = [
|
|
|
911
911
|
}
|
|
912
912
|
];
|
|
913
913
|
// src/components/experts/ExpertsPage.tsx
|
|
914
|
-
import { useMemo as
|
|
914
|
+
import { useMemo as useMemo41 } from "react";
|
|
915
915
|
|
|
916
916
|
// ../core/dist/esm/index.mjs
|
|
917
917
|
import { createContext } from "react";
|
|
@@ -945,9 +945,9 @@ import React9 from "react";
|
|
|
945
945
|
import {
|
|
946
946
|
forwardRef as forwardRef3,
|
|
947
947
|
useCallback as useCallback6,
|
|
948
|
-
useContext as
|
|
948
|
+
useContext as useContext18,
|
|
949
949
|
useEffect as useEffect3,
|
|
950
|
-
useMemo as
|
|
950
|
+
useMemo as useMemo15,
|
|
951
951
|
useRef as useRef6,
|
|
952
952
|
useState as useState5
|
|
953
953
|
} from "react";
|
|
@@ -966,13 +966,14 @@ import { useContext as useContext11 } from "react";
|
|
|
966
966
|
import { useContext as useContext13 } from "react";
|
|
967
967
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
968
968
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
969
|
-
import { createContext as createContext14 } from "react";
|
|
970
969
|
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
971
970
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
972
|
-
import React13, { createContext as
|
|
971
|
+
import React13, { createContext as createContext14 } from "react";
|
|
973
972
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
974
|
-
import
|
|
975
|
-
import {
|
|
973
|
+
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
974
|
+
import { createContext as createContext15 } from "react";
|
|
975
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
|
|
976
|
+
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
976
977
|
import { createContext as createContext16 } from "react";
|
|
977
978
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
978
979
|
import {
|
|
@@ -983,70 +984,70 @@ import {
|
|
|
983
984
|
useRef as useRef9,
|
|
984
985
|
useState as useState6
|
|
985
986
|
} from "react";
|
|
986
|
-
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as
|
|
987
|
-
import { useEffect as useEffect4, useMemo as
|
|
987
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
988
|
+
import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
|
|
988
989
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
989
990
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
990
|
-
import { useContext as
|
|
991
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
991
992
|
import {
|
|
992
993
|
createContext as createContext17,
|
|
993
994
|
useCallback as useCallback8,
|
|
994
995
|
useImperativeHandle as useImperativeHandle3,
|
|
995
996
|
useLayoutEffect as useLayoutEffect3,
|
|
996
|
-
useMemo as
|
|
997
|
+
useMemo as useMemo18,
|
|
997
998
|
useRef as useRef10,
|
|
998
999
|
useState as useState7
|
|
999
1000
|
} from "react";
|
|
1000
1001
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1001
|
-
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as
|
|
1002
|
-
import React17, { createContext as createContext18, useMemo as
|
|
1002
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
1003
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
1003
1004
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1004
|
-
import { useContext as
|
|
1005
|
+
import { useContext as useContext20 } from "react";
|
|
1005
1006
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
1006
1007
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1007
|
-
import { createContext as createContext20, useMemo as
|
|
1008
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
1008
1009
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1009
1010
|
import { useCallback as useCallback13 } from "react";
|
|
1010
1011
|
import React23, {
|
|
1011
1012
|
forwardRef as forwardRef5,
|
|
1012
|
-
useContext as
|
|
1013
|
+
useContext as useContext29,
|
|
1013
1014
|
useEffect as useEffect14,
|
|
1014
1015
|
useImperativeHandle as useImperativeHandle4,
|
|
1015
|
-
useMemo as
|
|
1016
|
+
useMemo as useMemo28,
|
|
1016
1017
|
useRef as useRef19,
|
|
1017
1018
|
useState as useState14
|
|
1018
1019
|
} from "react";
|
|
1019
|
-
import { useContext as
|
|
1020
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
1020
1021
|
import React20, {
|
|
1021
1022
|
createContext as createContext21,
|
|
1022
1023
|
createRef as createRef2,
|
|
1023
1024
|
useCallback as useCallback9,
|
|
1024
|
-
useContext as
|
|
1025
|
+
useContext as useContext21,
|
|
1025
1026
|
useEffect as useEffect7,
|
|
1026
|
-
useMemo as
|
|
1027
|
+
useMemo as useMemo22,
|
|
1027
1028
|
useRef as useRef12,
|
|
1028
1029
|
useState as useState10
|
|
1029
1030
|
} from "react";
|
|
1030
|
-
import { useMemo as
|
|
1031
|
+
import { useMemo as useMemo21, useRef as useRef11 } from "react";
|
|
1031
1032
|
import { jsx as jsx19, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1032
1033
|
import { useRef as useRef13 } from "react";
|
|
1033
|
-
import { useContext as
|
|
1034
|
-
import { useContext as
|
|
1034
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
|
|
1035
|
+
import { useContext as useContext23 } from "react";
|
|
1035
1036
|
import {
|
|
1036
1037
|
useCallback as useCallback12,
|
|
1037
|
-
useContext as
|
|
1038
|
+
useContext as useContext27,
|
|
1038
1039
|
useEffect as useEffect12,
|
|
1039
1040
|
useLayoutEffect as useLayoutEffect7,
|
|
1040
1041
|
useRef as useRef18
|
|
1041
1042
|
} from "react";
|
|
1042
|
-
import { useCallback as useCallback11, useMemo as
|
|
1043
|
-
import { useContext as
|
|
1043
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
|
|
1044
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
1044
1045
|
import React21, {
|
|
1045
1046
|
useCallback as useCallback10,
|
|
1046
|
-
useContext as
|
|
1047
|
+
useContext as useContext25,
|
|
1047
1048
|
useEffect as useEffect9,
|
|
1048
1049
|
useLayoutEffect as useLayoutEffect6,
|
|
1049
|
-
useMemo as
|
|
1050
|
+
useMemo as useMemo24,
|
|
1050
1051
|
useRef as useRef15,
|
|
1051
1052
|
useState as useState12
|
|
1052
1053
|
} from "react";
|
|
@@ -1055,15 +1056,15 @@ import React22 from "react";
|
|
|
1055
1056
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
1056
1057
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
1057
1058
|
import { useEffect as useEffect13 } from "react";
|
|
1058
|
-
import { createContext as createContext22, useContext as
|
|
1059
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
1059
1060
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1060
1061
|
import {
|
|
1061
1062
|
forwardRef as forwardRef6,
|
|
1062
|
-
useContext as
|
|
1063
|
+
useContext as useContext30,
|
|
1063
1064
|
useEffect as useEffect15,
|
|
1064
1065
|
useImperativeHandle as useImperativeHandle5,
|
|
1065
1066
|
useLayoutEffect as useLayoutEffect8,
|
|
1066
|
-
useMemo as
|
|
1067
|
+
useMemo as useMemo29,
|
|
1067
1068
|
useRef as useRef20
|
|
1068
1069
|
} from "react";
|
|
1069
1070
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
@@ -1073,7 +1074,7 @@ import {
|
|
|
1073
1074
|
useCallback as useCallback15,
|
|
1074
1075
|
useEffect as useEffect16,
|
|
1075
1076
|
useImperativeHandle as useImperativeHandle6,
|
|
1076
|
-
useMemo as
|
|
1077
|
+
useMemo as useMemo30,
|
|
1077
1078
|
useRef as useRef21,
|
|
1078
1079
|
useState as useState15
|
|
1079
1080
|
} from "react";
|
|
@@ -1082,19 +1083,19 @@ import {
|
|
|
1082
1083
|
createContext as createContext23,
|
|
1083
1084
|
forwardRef as forwardRef9,
|
|
1084
1085
|
useCallback as useCallback16,
|
|
1085
|
-
useContext as
|
|
1086
|
+
useContext as useContext32,
|
|
1086
1087
|
useLayoutEffect as useLayoutEffect9,
|
|
1087
|
-
useMemo as
|
|
1088
|
+
useMemo as useMemo31,
|
|
1088
1089
|
useRef as useRef22
|
|
1089
1090
|
} from "react";
|
|
1090
1091
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1091
1092
|
import {
|
|
1092
1093
|
forwardRef as forwardRef10,
|
|
1093
1094
|
useCallback as useCallback17,
|
|
1094
|
-
useContext as
|
|
1095
|
+
useContext as useContext33,
|
|
1095
1096
|
useImperativeHandle as useImperativeHandle7,
|
|
1096
1097
|
useLayoutEffect as useLayoutEffect10,
|
|
1097
|
-
useMemo as
|
|
1098
|
+
useMemo as useMemo32,
|
|
1098
1099
|
useRef as useRef23,
|
|
1099
1100
|
useState as useState16
|
|
1100
1101
|
} from "react";
|
|
@@ -1103,7 +1104,7 @@ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as u
|
|
|
1103
1104
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1104
1105
|
import {
|
|
1105
1106
|
useCallback as useCallback19,
|
|
1106
|
-
useContext as
|
|
1107
|
+
useContext as useContext34,
|
|
1107
1108
|
useLayoutEffect as useLayoutEffect11,
|
|
1108
1109
|
useRef as useRef24,
|
|
1109
1110
|
useState as useState18
|
|
@@ -1116,59 +1117,59 @@ import React31 from "react";
|
|
|
1116
1117
|
import {
|
|
1117
1118
|
useCallback as useCallback21,
|
|
1118
1119
|
useImperativeHandle as useImperativeHandle8,
|
|
1119
|
-
useMemo as
|
|
1120
|
+
useMemo as useMemo33,
|
|
1120
1121
|
useRef as useRef26,
|
|
1121
1122
|
useState as useState19
|
|
1122
1123
|
} from "react";
|
|
1123
1124
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1124
1125
|
import React32 from "react";
|
|
1125
|
-
import { useMemo as
|
|
1126
|
-
import { createContext as createContext24, useContext as
|
|
1126
|
+
import { useMemo as useMemo35 } from "react";
|
|
1127
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
|
|
1127
1128
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1128
1129
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1129
1130
|
import React34 from "react";
|
|
1130
1131
|
import React35, { createContext as createContext25 } from "react";
|
|
1131
|
-
import React36, { useContext as
|
|
1132
|
+
import React36, { useContext as useContext36 } from "react";
|
|
1132
1133
|
import { useCallback as useCallback24 } from "react";
|
|
1133
1134
|
import {
|
|
1134
1135
|
useCallback as useCallback22,
|
|
1135
|
-
useContext as
|
|
1136
|
+
useContext as useContext37,
|
|
1136
1137
|
useEffect as useEffect17,
|
|
1137
1138
|
useLayoutEffect as useLayoutEffect12,
|
|
1138
|
-
useMemo as
|
|
1139
|
+
useMemo as useMemo36,
|
|
1139
1140
|
useState as useState20
|
|
1140
1141
|
} from "react";
|
|
1141
1142
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1142
1143
|
import React38, {
|
|
1143
1144
|
forwardRef as forwardRef13,
|
|
1144
1145
|
useCallback as useCallback23,
|
|
1145
|
-
useContext as
|
|
1146
|
+
useContext as useContext38,
|
|
1146
1147
|
useEffect as useEffect19,
|
|
1147
1148
|
useImperativeHandle as useImperativeHandle9,
|
|
1148
|
-
useMemo as
|
|
1149
|
+
useMemo as useMemo37,
|
|
1149
1150
|
useRef as useRef27,
|
|
1150
1151
|
useState as useState21
|
|
1151
1152
|
} from "react";
|
|
1152
1153
|
import { useEffect as useEffect18 } from "react";
|
|
1153
1154
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1154
1155
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1155
|
-
import React40, { useMemo as
|
|
1156
|
+
import React40, { useMemo as useMemo38 } from "react";
|
|
1156
1157
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1157
1158
|
import React42, {
|
|
1158
1159
|
forwardRef as forwardRef14,
|
|
1159
|
-
useMemo as
|
|
1160
|
+
useMemo as useMemo39
|
|
1160
1161
|
} from "react";
|
|
1161
1162
|
import React41 from "react";
|
|
1162
1163
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
1163
1164
|
import React43 from "react";
|
|
1164
|
-
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
1165
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
|
|
1165
1166
|
import {
|
|
1166
1167
|
forwardRef as forwardRef15,
|
|
1167
|
-
useContext as
|
|
1168
|
+
useContext as useContext39,
|
|
1168
1169
|
useEffect as useEffect20,
|
|
1169
1170
|
useImperativeHandle as useImperativeHandle10,
|
|
1170
1171
|
useLayoutEffect as useLayoutEffect13,
|
|
1171
|
-
useMemo as
|
|
1172
|
+
useMemo as useMemo40,
|
|
1172
1173
|
useRef as useRef28
|
|
1173
1174
|
} from "react";
|
|
1174
1175
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -2359,7 +2360,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2359
2360
|
}
|
|
2360
2361
|
return child.type;
|
|
2361
2362
|
};
|
|
2362
|
-
var VERSION = "4.0.
|
|
2363
|
+
var VERSION = "4.0.495";
|
|
2363
2364
|
var checkMultipleRemotionVersions = () => {
|
|
2364
2365
|
if (typeof globalThis === "undefined") {
|
|
2365
2366
|
return;
|
|
@@ -2852,15 +2853,19 @@ var premountSchema = {
|
|
|
2852
2853
|
description: "Premount For",
|
|
2853
2854
|
min: 0,
|
|
2854
2855
|
step: 1,
|
|
2855
|
-
hiddenFromList: false
|
|
2856
|
+
hiddenFromList: false,
|
|
2857
|
+
keyframable: false
|
|
2856
2858
|
},
|
|
2857
2859
|
postmountFor: {
|
|
2858
2860
|
type: "number",
|
|
2859
2861
|
default: 0,
|
|
2860
2862
|
min: 0,
|
|
2861
2863
|
step: 1,
|
|
2862
|
-
hiddenFromList: true
|
|
2863
|
-
|
|
2864
|
+
hiddenFromList: true,
|
|
2865
|
+
keyframable: false
|
|
2866
|
+
}
|
|
2867
|
+
};
|
|
2868
|
+
var premountStyleSchema = {
|
|
2864
2869
|
styleWhilePremounted: {
|
|
2865
2870
|
type: "hidden"
|
|
2866
2871
|
},
|
|
@@ -2868,10 +2873,13 @@ var premountSchema = {
|
|
|
2868
2873
|
type: "hidden"
|
|
2869
2874
|
}
|
|
2870
2875
|
};
|
|
2871
|
-
var sequencePremountSchema =
|
|
2876
|
+
var sequencePremountSchema = {
|
|
2877
|
+
...premountSchema,
|
|
2878
|
+
...premountStyleSchema
|
|
2879
|
+
};
|
|
2872
2880
|
var sequenceStyleSchema = {
|
|
2873
2881
|
...transformSchema,
|
|
2874
|
-
...
|
|
2882
|
+
...sequencePremountSchema
|
|
2875
2883
|
};
|
|
2876
2884
|
var hiddenField = {
|
|
2877
2885
|
type: "boolean",
|
|
@@ -2956,9 +2964,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2956
2964
|
default: "none"
|
|
2957
2965
|
}
|
|
2958
2966
|
};
|
|
2959
|
-
var PremountContext = createContext14({
|
|
2960
|
-
premountFramesRemaining: 0
|
|
2961
|
-
});
|
|
2962
2967
|
var SequenceManager = React12.createContext({
|
|
2963
2968
|
registerSequence: () => {
|
|
2964
2969
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -3138,7 +3143,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
3138
3143
|
})
|
|
3139
3144
|
});
|
|
3140
3145
|
};
|
|
3141
|
-
var IsInsideSeriesContext =
|
|
3146
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
3142
3147
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
3143
3148
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
3144
3149
|
value: true,
|
|
@@ -3157,7 +3162,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
3157
3162
|
throw new Error("This component must be inside a <Series /> component.");
|
|
3158
3163
|
}
|
|
3159
3164
|
};
|
|
3165
|
+
var PremountContext = createContext15({
|
|
3166
|
+
premountFramesRemaining: 0
|
|
3167
|
+
});
|
|
3160
3168
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
3169
|
+
var usePremounting = ({
|
|
3170
|
+
from,
|
|
3171
|
+
durationInFrames,
|
|
3172
|
+
premountFor,
|
|
3173
|
+
postmountFor,
|
|
3174
|
+
style,
|
|
3175
|
+
styleWhilePremounted,
|
|
3176
|
+
styleWhilePostmounted,
|
|
3177
|
+
hideWhilePremounted
|
|
3178
|
+
}) => {
|
|
3179
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
3180
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
3181
|
+
const environment = useRemotionEnvironment();
|
|
3182
|
+
const { fps } = useVideoConfig();
|
|
3183
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
3184
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
3185
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
3186
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
3187
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
3188
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
3189
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
3190
|
+
const premountingStyle = useMemo13(() => {
|
|
3191
|
+
if (!isPremountingOrPostmounting) {
|
|
3192
|
+
return style;
|
|
3193
|
+
}
|
|
3194
|
+
return {
|
|
3195
|
+
...style,
|
|
3196
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
3197
|
+
pointerEvents: "none",
|
|
3198
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
3199
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
3200
|
+
};
|
|
3201
|
+
}, [
|
|
3202
|
+
isPremountingOrPostmounting,
|
|
3203
|
+
hideWhilePremounted,
|
|
3204
|
+
postmountingActive,
|
|
3205
|
+
premountingActive,
|
|
3206
|
+
style,
|
|
3207
|
+
styleWhilePostmounted,
|
|
3208
|
+
styleWhilePremounted
|
|
3209
|
+
]);
|
|
3210
|
+
return {
|
|
3211
|
+
effectivePremountFor,
|
|
3212
|
+
effectivePostmountFor,
|
|
3213
|
+
premountingActive,
|
|
3214
|
+
postmountingActive,
|
|
3215
|
+
isPremountingOrPostmounting,
|
|
3216
|
+
freezeFrame,
|
|
3217
|
+
premountingStyle
|
|
3218
|
+
};
|
|
3219
|
+
};
|
|
3161
3220
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
3162
3221
|
for (const key of keysToRemove) {
|
|
3163
3222
|
const parts = key.split(".");
|
|
@@ -4981,10 +5040,10 @@ var useMemoizedEffects = ({
|
|
|
4981
5040
|
overrideId
|
|
4982
5041
|
}) => {
|
|
4983
5042
|
const previousRef = useRef5(null);
|
|
4984
|
-
const { propStatuses } =
|
|
4985
|
-
const { getEffectDragOverrides } =
|
|
5043
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
5044
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
4986
5045
|
const frame = useCurrentFrame();
|
|
4987
|
-
const { overrideIdToNodePathMappings } =
|
|
5046
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
4988
5047
|
const previous = previousRef.current;
|
|
4989
5048
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
4990
5049
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -5328,9 +5387,9 @@ var withInteractivitySchema = ({
|
|
|
5328
5387
|
ref
|
|
5329
5388
|
});
|
|
5330
5389
|
}
|
|
5331
|
-
const { propStatuses } =
|
|
5332
|
-
const { getDragOverrides } =
|
|
5333
|
-
const nodePathMapping =
|
|
5390
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
5391
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
5392
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
5334
5393
|
const frame = useCurrentFrame();
|
|
5335
5394
|
if (props.controls) {
|
|
5336
5395
|
return React14.createElement(Component, {
|
|
@@ -5357,8 +5416,8 @@ var withInteractivitySchema = ({
|
|
|
5357
5416
|
key,
|
|
5358
5417
|
props
|
|
5359
5418
|
}));
|
|
5360
|
-
const currentRuntimeValueDotNotation =
|
|
5361
|
-
const controls =
|
|
5419
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
5420
|
+
const controls = useMemo14(() => {
|
|
5362
5421
|
return {
|
|
5363
5422
|
schema: schemaWithSequenceName,
|
|
5364
5423
|
currentRuntimeValueDotNotation,
|
|
@@ -5368,7 +5427,7 @@ var withInteractivitySchema = ({
|
|
|
5368
5427
|
componentName
|
|
5369
5428
|
};
|
|
5370
5429
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5371
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
5430
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
5372
5431
|
return computeEffectiveSchemaValuesDotNotation({
|
|
5373
5432
|
schema: schemaWithSequenceName,
|
|
5374
5433
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -5426,7 +5485,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5426
5485
|
}, ref) => {
|
|
5427
5486
|
const { layout = "absolute-fill" } = other;
|
|
5428
5487
|
const [id] = useState5(() => String(Math.random()));
|
|
5429
|
-
const parentSequence =
|
|
5488
|
+
const parentSequence = useContext18(SequenceContext);
|
|
5430
5489
|
const { rootId } = useTimelineContext();
|
|
5431
5490
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5432
5491
|
const nonce = useNonce();
|
|
@@ -5477,13 +5536,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5477
5536
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
5478
5537
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
5479
5538
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
5480
|
-
const { registerSequence, unregisterSequence } =
|
|
5539
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
5481
5540
|
const wrapperRefForOutline = useRef6(null);
|
|
5482
5541
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
5483
|
-
const premounting =
|
|
5542
|
+
const premounting = useMemo15(() => {
|
|
5484
5543
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
5485
5544
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
5486
|
-
const postmounting =
|
|
5545
|
+
const postmounting = useMemo15(() => {
|
|
5487
5546
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
5488
5547
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
5489
5548
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -5491,7 +5550,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5491
5550
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
5492
5551
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
5493
5552
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
5494
|
-
const contextValue =
|
|
5553
|
+
const contextValue = useMemo15(() => {
|
|
5495
5554
|
return {
|
|
5496
5555
|
absoluteFrom,
|
|
5497
5556
|
cumulatedFrom,
|
|
@@ -5522,12 +5581,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5522
5581
|
postmountDisplay,
|
|
5523
5582
|
cumulatedNegativeFrom
|
|
5524
5583
|
]);
|
|
5525
|
-
const timelineClipName =
|
|
5584
|
+
const timelineClipName = useMemo15(() => {
|
|
5526
5585
|
return name ?? "";
|
|
5527
5586
|
}, [name]);
|
|
5528
5587
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
5529
5588
|
const env = useRemotionEnvironment();
|
|
5530
|
-
const isInsideSeries =
|
|
5589
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
5531
5590
|
const inheritedStack = other?.stack ?? null;
|
|
5532
5591
|
const stackRef = useRef6(null);
|
|
5533
5592
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -5675,7 +5734,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5675
5734
|
ref.current = node;
|
|
5676
5735
|
}
|
|
5677
5736
|
}, [ref]);
|
|
5678
|
-
const defaultStyle =
|
|
5737
|
+
const defaultStyle = useMemo15(() => {
|
|
5679
5738
|
return {
|
|
5680
5739
|
flexDirection: undefined,
|
|
5681
5740
|
...width ? { width } : {},
|
|
@@ -5701,8 +5760,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5701
5760
|
};
|
|
5702
5761
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
5703
5762
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
5704
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
5705
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
5706
5763
|
if (props.layout === "none") {
|
|
5707
5764
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
5708
5765
|
}
|
|
@@ -5716,34 +5773,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
5716
5773
|
styleWhilePostmounted,
|
|
5717
5774
|
...otherProps
|
|
5718
5775
|
} = props;
|
|
5719
|
-
const
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
5723
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
5724
|
-
const style = useMemo14(() => {
|
|
5725
|
-
return {
|
|
5726
|
-
...passedStyle,
|
|
5727
|
-
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
5728
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
5729
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
5730
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
5731
|
-
};
|
|
5732
|
-
}, [
|
|
5733
|
-
passedStyle,
|
|
5734
|
-
premountingActive,
|
|
5776
|
+
const {
|
|
5777
|
+
freezeFrame,
|
|
5778
|
+
isPremountingOrPostmounting,
|
|
5735
5779
|
postmountingActive,
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5780
|
+
premountingActive,
|
|
5781
|
+
premountingStyle
|
|
5782
|
+
} = usePremounting({
|
|
5783
|
+
from,
|
|
5784
|
+
durationInFrames,
|
|
5785
|
+
premountFor,
|
|
5786
|
+
postmountFor,
|
|
5787
|
+
style: passedStyle ?? null,
|
|
5788
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
5789
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
5790
|
+
hideWhilePremounted: "opacity"
|
|
5791
|
+
});
|
|
5739
5792
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
5740
5793
|
frame: freezeFrame,
|
|
5741
|
-
active:
|
|
5794
|
+
active: isPremountingOrPostmounting,
|
|
5742
5795
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
5743
5796
|
ref,
|
|
5744
5797
|
from,
|
|
5745
5798
|
durationInFrames,
|
|
5746
|
-
style,
|
|
5799
|
+
style: premountingStyle ?? undefined,
|
|
5747
5800
|
_remotionInternalPremountDisplay: premountFor,
|
|
5748
5801
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
5749
5802
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -6079,7 +6132,7 @@ var useEffectChainState = () => {
|
|
|
6079
6132
|
}
|
|
6080
6133
|
};
|
|
6081
6134
|
}, []);
|
|
6082
|
-
return
|
|
6135
|
+
return useMemo16(() => ({
|
|
6083
6136
|
get: (width, height) => {
|
|
6084
6137
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
6085
6138
|
if (chainStateRef.current) {
|
|
@@ -6095,7 +6148,7 @@ var useEffectChainState = () => {
|
|
|
6095
6148
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
6096
6149
|
const canvasRef = useRef8(null);
|
|
6097
6150
|
const chainState = useEffectChainState();
|
|
6098
|
-
const sourceCanvas =
|
|
6151
|
+
const sourceCanvas = useMemo17(() => {
|
|
6099
6152
|
if (typeof document === "undefined") {
|
|
6100
6153
|
return null;
|
|
6101
6154
|
}
|
|
@@ -6302,6 +6355,13 @@ var decodeImage = async ({
|
|
|
6302
6355
|
frameCount: selectedTrack.frameCount
|
|
6303
6356
|
};
|
|
6304
6357
|
};
|
|
6358
|
+
var getCurrentTime = ({
|
|
6359
|
+
frame,
|
|
6360
|
+
playbackRate,
|
|
6361
|
+
fps
|
|
6362
|
+
}) => {
|
|
6363
|
+
return frame * playbackRate / fps;
|
|
6364
|
+
};
|
|
6305
6365
|
var serializeRequestInit = (requestInit) => {
|
|
6306
6366
|
if (!requestInit) {
|
|
6307
6367
|
return null;
|
|
@@ -6369,7 +6429,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6369
6429
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
6370
6430
|
const frame = useCurrentFrame();
|
|
6371
6431
|
const { fps } = useVideoConfig();
|
|
6372
|
-
const currentTime = frame
|
|
6432
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
6373
6433
|
const currentTimeRef = useRef9(currentTime);
|
|
6374
6434
|
currentTimeRef.current = currentTime;
|
|
6375
6435
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -6497,8 +6557,6 @@ var AnimatedImageInner = ({
|
|
|
6497
6557
|
ref,
|
|
6498
6558
|
...sequenceProps
|
|
6499
6559
|
}) => {
|
|
6500
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
6501
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
6502
6560
|
const actualRef = useRef9(null);
|
|
6503
6561
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
6504
6562
|
useImperativeHandle2(ref, () => {
|
|
@@ -6521,7 +6579,7 @@ var AnimatedImageInner = ({
|
|
|
6521
6579
|
};
|
|
6522
6580
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
6523
6581
|
layout: "none",
|
|
6524
|
-
durationInFrames
|
|
6582
|
+
durationInFrames,
|
|
6525
6583
|
name: "<AnimatedImage>",
|
|
6526
6584
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
6527
6585
|
controls,
|
|
@@ -6647,7 +6705,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6647
6705
|
};
|
|
6648
6706
|
}
|
|
6649
6707
|
}, []);
|
|
6650
|
-
const contextValue =
|
|
6708
|
+
const contextValue = useMemo18(() => {
|
|
6651
6709
|
return {
|
|
6652
6710
|
registerRenderAsset,
|
|
6653
6711
|
unregisterRenderAsset,
|
|
@@ -6661,7 +6719,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6661
6719
|
};
|
|
6662
6720
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
6663
6721
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
6664
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
6722
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
6665
6723
|
const env = useRemotionEnvironment();
|
|
6666
6724
|
const frame = useCurrentFrame();
|
|
6667
6725
|
const [id] = useState8(() => {
|
|
@@ -6776,14 +6834,14 @@ var Loop = ({
|
|
|
6776
6834
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
6777
6835
|
const start = iteration * durationInFrames;
|
|
6778
6836
|
const from = Math.min(start, maxFrame);
|
|
6779
|
-
const loopDisplay =
|
|
6837
|
+
const loopDisplay = useMemo19(() => {
|
|
6780
6838
|
return {
|
|
6781
6839
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
6782
6840
|
startOffset: -from,
|
|
6783
6841
|
durationInFrames
|
|
6784
6842
|
};
|
|
6785
6843
|
}, [compDuration, durationInFrames, from, times]);
|
|
6786
|
-
const loopContext =
|
|
6844
|
+
const loopContext = useMemo19(() => {
|
|
6787
6845
|
return {
|
|
6788
6846
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
6789
6847
|
durationInFrames
|
|
@@ -6852,7 +6910,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
6852
6910
|
return src.slice(0, hashIndex);
|
|
6853
6911
|
};
|
|
6854
6912
|
var usePreload = (src) => {
|
|
6855
|
-
const preloads2 =
|
|
6913
|
+
const preloads2 = useContext20(PreloadContext);
|
|
6856
6914
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
6857
6915
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
6858
6916
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -7155,7 +7213,7 @@ var DurationsContext = createContext20({
|
|
|
7155
7213
|
});
|
|
7156
7214
|
var DurationsContextProvider = ({ children }) => {
|
|
7157
7215
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
7158
|
-
const value =
|
|
7216
|
+
const value = useMemo20(() => {
|
|
7159
7217
|
return {
|
|
7160
7218
|
durations,
|
|
7161
7219
|
setDurations
|
|
@@ -7294,7 +7352,7 @@ var useSingletonAudioContext = ({
|
|
|
7294
7352
|
if (sampleRate !== initialSampleRate.current) {
|
|
7295
7353
|
throw new Error(`Changing the AudioContext sample rate dynamically is not supported. The sample rate was initialized with ${initialSampleRate.current} Hz, but ${sampleRate} Hz was passed later.`);
|
|
7296
7354
|
}
|
|
7297
|
-
const context =
|
|
7355
|
+
const context = useMemo21(() => {
|
|
7298
7356
|
if (env.isRendering) {
|
|
7299
7357
|
return null;
|
|
7300
7358
|
}
|
|
@@ -7428,9 +7486,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7428
7486
|
});
|
|
7429
7487
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
7430
7488
|
const isResuming = useRef12(null);
|
|
7431
|
-
const audioSyncAnchor =
|
|
7489
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
7432
7490
|
const audioSyncAnchorListeners = useRef12([]);
|
|
7433
|
-
const audioSyncAnchorEmitter =
|
|
7491
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
7434
7492
|
return {
|
|
7435
7493
|
dispatch: (event) => {
|
|
7436
7494
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -7450,7 +7508,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7450
7508
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
7451
7509
|
nodesToResume.current.delete(node);
|
|
7452
7510
|
}, []);
|
|
7453
|
-
const scheduleAudioNode =
|
|
7511
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
7454
7512
|
return ({
|
|
7455
7513
|
node,
|
|
7456
7514
|
mediaTimestamp,
|
|
@@ -7542,7 +7600,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7542
7600
|
audioContextIsPlayingEventually.current = false;
|
|
7543
7601
|
return ctxAndGain.suspend();
|
|
7544
7602
|
}, [ctxAndGain]);
|
|
7545
|
-
const audioContextValue =
|
|
7603
|
+
const audioContextValue = useMemo22(() => {
|
|
7546
7604
|
return {
|
|
7547
7605
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
7548
7606
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -7579,10 +7637,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7579
7637
|
const logLevel = useLogLevel();
|
|
7580
7638
|
const mountTime = useMountTime();
|
|
7581
7639
|
const env = useRemotionEnvironment();
|
|
7582
|
-
const audioCtx =
|
|
7640
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
7583
7641
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
7584
7642
|
const resume = audioCtx?.resume;
|
|
7585
|
-
const refs =
|
|
7643
|
+
const refs = useMemo22(() => {
|
|
7586
7644
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
7587
7645
|
const ref = createRef2();
|
|
7588
7646
|
return {
|
|
@@ -7721,7 +7779,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7721
7779
|
});
|
|
7722
7780
|
resume?.();
|
|
7723
7781
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
7724
|
-
const audioTagsValue =
|
|
7782
|
+
const audioTagsValue = useMemo22(() => {
|
|
7725
7783
|
return {
|
|
7726
7784
|
registerAudio,
|
|
7727
7785
|
unregisterAudio,
|
|
@@ -7736,7 +7794,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7736
7794
|
unregisterAudio,
|
|
7737
7795
|
updateAudio
|
|
7738
7796
|
]);
|
|
7739
|
-
const sharedAudioTagElements =
|
|
7797
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
7740
7798
|
return refs.map(({ id, ref }) => {
|
|
7741
7799
|
return /* @__PURE__ */ jsx19("audio", {
|
|
7742
7800
|
ref,
|
|
@@ -7759,8 +7817,8 @@ var useSharedAudio = ({
|
|
|
7759
7817
|
premounting,
|
|
7760
7818
|
postmounting
|
|
7761
7819
|
}) => {
|
|
7762
|
-
const audioCtx =
|
|
7763
|
-
const tagsCtx =
|
|
7820
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
7821
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
7764
7822
|
const [elem] = useState10(() => {
|
|
7765
7823
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
7766
7824
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -7939,7 +7997,7 @@ var useVolume = ({
|
|
|
7939
7997
|
const audioStuffRef = useRef14(null);
|
|
7940
7998
|
const currentVolumeRef = useRef14(volume);
|
|
7941
7999
|
currentVolumeRef.current = volume;
|
|
7942
|
-
const sharedAudioContext =
|
|
8000
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
7943
8001
|
if (!sharedAudioContext) {
|
|
7944
8002
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
7945
8003
|
}
|
|
@@ -8004,7 +8062,7 @@ var useVolume = ({
|
|
|
8004
8062
|
return audioStuffRef;
|
|
8005
8063
|
};
|
|
8006
8064
|
var useMediaStartsAt = () => {
|
|
8007
|
-
const parentSequence =
|
|
8065
|
+
const parentSequence = useContext23(SequenceContext);
|
|
8008
8066
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
8009
8067
|
};
|
|
8010
8068
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -8093,7 +8151,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8093
8151
|
if (!src) {
|
|
8094
8152
|
throw new Error("No src passed");
|
|
8095
8153
|
}
|
|
8096
|
-
const parentSequence =
|
|
8154
|
+
const parentSequence = useContext24(SequenceContext);
|
|
8097
8155
|
const [initialVolume] = useState11(() => volume);
|
|
8098
8156
|
const duration = getTimelineDuration({
|
|
8099
8157
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -8103,7 +8161,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8103
8161
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
8104
8162
|
loop
|
|
8105
8163
|
});
|
|
8106
|
-
const volumes =
|
|
8164
|
+
const volumes = useMemo23(() => {
|
|
8107
8165
|
if (typeof volume === "number") {
|
|
8108
8166
|
return volume;
|
|
8109
8167
|
}
|
|
@@ -8124,7 +8182,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8124
8182
|
const nonce = useNonce();
|
|
8125
8183
|
const { rootId } = useTimelineContext();
|
|
8126
8184
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
8127
|
-
const memoizedResult =
|
|
8185
|
+
const memoizedResult = useMemo23(() => {
|
|
8128
8186
|
return {
|
|
8129
8187
|
volumes,
|
|
8130
8188
|
duration,
|
|
@@ -8165,9 +8223,9 @@ var useMediaInTimeline = ({
|
|
|
8165
8223
|
documentationLink,
|
|
8166
8224
|
refForOutline
|
|
8167
8225
|
}) => {
|
|
8168
|
-
const parentSequence =
|
|
8226
|
+
const parentSequence = useContext24(SequenceContext);
|
|
8169
8227
|
const startsAt = useMediaStartsAt();
|
|
8170
|
-
const { registerSequence, unregisterSequence } =
|
|
8228
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
8171
8229
|
const { durationInFrames } = useVideoConfig();
|
|
8172
8230
|
const mediaStartsAt = useMediaStartsAt();
|
|
8173
8231
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -8332,13 +8390,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8332
8390
|
}
|
|
8333
8391
|
}, [blocks]);
|
|
8334
8392
|
}
|
|
8335
|
-
return
|
|
8393
|
+
return useMemo24(() => {
|
|
8336
8394
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
8337
8395
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
8338
8396
|
};
|
|
8339
8397
|
var BufferingContextReact = React21.createContext(null);
|
|
8340
8398
|
var BufferingProvider = ({ children }) => {
|
|
8341
|
-
const { logLevel, mountTime } =
|
|
8399
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
8342
8400
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
8343
8401
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
8344
8402
|
value: bufferManager,
|
|
@@ -8364,10 +8422,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
8364
8422
|
return isBuffering;
|
|
8365
8423
|
};
|
|
8366
8424
|
var useBufferState = () => {
|
|
8367
|
-
const buffer =
|
|
8425
|
+
const buffer = useContext26(BufferingContextReact);
|
|
8368
8426
|
const logLevel = useLogLevel();
|
|
8369
8427
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
8370
|
-
return
|
|
8428
|
+
return useMemo25(() => ({
|
|
8371
8429
|
delayPlayback: () => {
|
|
8372
8430
|
if (!addBlock) {
|
|
8373
8431
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
@@ -8475,7 +8533,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
8475
8533
|
onVariableFpsVideoDetected,
|
|
8476
8534
|
pauseWhenBuffering
|
|
8477
8535
|
]);
|
|
8478
|
-
return
|
|
8536
|
+
return useMemo26(() => {
|
|
8479
8537
|
return {
|
|
8480
8538
|
isBuffering: () => bufferingRef.current,
|
|
8481
8539
|
bufferUntilFirstFrame
|
|
@@ -8849,7 +8907,7 @@ var useMediaPlayback = ({
|
|
|
8849
8907
|
const frame = useCurrentFrame();
|
|
8850
8908
|
const absoluteFrame = useTimelinePosition();
|
|
8851
8909
|
const [playing] = usePlayingState();
|
|
8852
|
-
const buffering =
|
|
8910
|
+
const buffering = useContext27(BufferingContextReact);
|
|
8853
8911
|
const { fps } = useVideoConfig();
|
|
8854
8912
|
const mediaStartsAt = useMediaStartsAt();
|
|
8855
8913
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -9144,16 +9202,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
9144
9202
|
}
|
|
9145
9203
|
});
|
|
9146
9204
|
var useMediaVolumeState = () => {
|
|
9147
|
-
const { mediaVolume } =
|
|
9148
|
-
const { setMediaVolume } =
|
|
9149
|
-
return
|
|
9205
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
9206
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
9207
|
+
return useMemo27(() => {
|
|
9150
9208
|
return [mediaVolume, setMediaVolume];
|
|
9151
9209
|
}, [mediaVolume, setMediaVolume]);
|
|
9152
9210
|
};
|
|
9153
9211
|
var usePlayerMutedState = () => {
|
|
9154
|
-
const { playerMuted } =
|
|
9155
|
-
const { setPlayerMuted } =
|
|
9156
|
-
return
|
|
9212
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
9213
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
9214
|
+
return useMemo27(() => {
|
|
9157
9215
|
return [playerMuted, setPlayerMuted];
|
|
9158
9216
|
}, [playerMuted, setPlayerMuted]);
|
|
9159
9217
|
};
|
|
@@ -9207,7 +9265,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9207
9265
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
9208
9266
|
}
|
|
9209
9267
|
const preloadedSrc = usePreload(src);
|
|
9210
|
-
const sequenceContext =
|
|
9268
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
9211
9269
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
9212
9270
|
const userPreferredVolume = evaluateVolume({
|
|
9213
9271
|
frame: volumePropFrame,
|
|
@@ -9220,7 +9278,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9220
9278
|
requestsVideoFrame: false,
|
|
9221
9279
|
isClientSideRendering: false
|
|
9222
9280
|
});
|
|
9223
|
-
const propsToPass =
|
|
9281
|
+
const propsToPass = useMemo28(() => {
|
|
9224
9282
|
return {
|
|
9225
9283
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
9226
9284
|
src: preloadedSrc,
|
|
@@ -9237,7 +9295,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9237
9295
|
userPreferredVolume,
|
|
9238
9296
|
crossOriginValue
|
|
9239
9297
|
]);
|
|
9240
|
-
const id =
|
|
9298
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
9241
9299
|
src,
|
|
9242
9300
|
sequenceContext?.relativeFrom,
|
|
9243
9301
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9367,10 +9425,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9367
9425
|
const absoluteFrame = useTimelinePosition();
|
|
9368
9426
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
9369
9427
|
const frame = useCurrentFrame();
|
|
9370
|
-
const sequenceContext =
|
|
9371
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9428
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
9429
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
9372
9430
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9373
|
-
const id =
|
|
9431
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9374
9432
|
props.src,
|
|
9375
9433
|
sequenceContext?.relativeFrom,
|
|
9376
9434
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9477,7 +9535,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9477
9535
|
};
|
|
9478
9536
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
9479
9537
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
9480
|
-
const audioTagsContext =
|
|
9538
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
9481
9539
|
const propsWithFreeze = props;
|
|
9482
9540
|
const {
|
|
9483
9541
|
startFrom,
|
|
@@ -9501,7 +9559,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
9501
9559
|
if (typeof freeze !== "undefined") {
|
|
9502
9560
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
9503
9561
|
}
|
|
9504
|
-
const { durations, setDurations } =
|
|
9562
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
9505
9563
|
if (typeof props.src !== "string") {
|
|
9506
9564
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
9507
9565
|
}
|
|
@@ -9663,7 +9721,7 @@ var SolidInner = ({
|
|
|
9663
9721
|
effects,
|
|
9664
9722
|
overrideId: overrideId ?? null
|
|
9665
9723
|
});
|
|
9666
|
-
const sourceCanvas =
|
|
9724
|
+
const sourceCanvas = useMemo30(() => {
|
|
9667
9725
|
if (typeof document === "undefined") {
|
|
9668
9726
|
return null;
|
|
9669
9727
|
}
|
|
@@ -9731,7 +9789,7 @@ var SolidInner = ({
|
|
|
9731
9789
|
cancelRender2,
|
|
9732
9790
|
memoizedEffects
|
|
9733
9791
|
]);
|
|
9734
|
-
const canvasStyle =
|
|
9792
|
+
const canvasStyle = useMemo30(() => {
|
|
9735
9793
|
return {
|
|
9736
9794
|
width,
|
|
9737
9795
|
height,
|
|
@@ -9880,7 +9938,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9880
9938
|
controls,
|
|
9881
9939
|
style
|
|
9882
9940
|
}, ref) => {
|
|
9883
|
-
const ancestor =
|
|
9941
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
9884
9942
|
assertHtmlInCanvasDimensions(width, height);
|
|
9885
9943
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
9886
9944
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -10099,20 +10157,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10099
10157
|
continueRender2(handle);
|
|
10100
10158
|
};
|
|
10101
10159
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
10102
|
-
const innerStyle =
|
|
10160
|
+
const innerStyle = useMemo31(() => {
|
|
10103
10161
|
return {
|
|
10104
10162
|
width,
|
|
10105
10163
|
height
|
|
10106
10164
|
};
|
|
10107
10165
|
}, [width, height]);
|
|
10108
|
-
const canvasStyle =
|
|
10166
|
+
const canvasStyle = useMemo31(() => {
|
|
10109
10167
|
return {
|
|
10110
10168
|
width,
|
|
10111
10169
|
height,
|
|
10112
10170
|
...style ?? {}
|
|
10113
10171
|
};
|
|
10114
10172
|
}, [height, style, width]);
|
|
10115
|
-
const ancestorValue =
|
|
10173
|
+
const ancestorValue = useMemo31(() => {
|
|
10116
10174
|
return {
|
|
10117
10175
|
requestParentPaint: () => {
|
|
10118
10176
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -10149,8 +10207,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10149
10207
|
name,
|
|
10150
10208
|
...sequenceProps
|
|
10151
10209
|
}, ref) => {
|
|
10152
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
10153
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
10154
10210
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
10155
10211
|
const actualRef = useRef22(null);
|
|
10156
10212
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -10162,7 +10218,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10162
10218
|
}
|
|
10163
10219
|
}, [ref]);
|
|
10164
10220
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
10165
|
-
durationInFrames
|
|
10221
|
+
durationInFrames,
|
|
10166
10222
|
name: name ?? "<HtmlInCanvas>",
|
|
10167
10223
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
10168
10224
|
controls,
|
|
@@ -10328,7 +10384,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10328
10384
|
effects,
|
|
10329
10385
|
overrideId: controls?.overrideId ?? null
|
|
10330
10386
|
});
|
|
10331
|
-
const sequenceContext =
|
|
10387
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
10332
10388
|
const pendingLoadDelayRef = useRef23(null);
|
|
10333
10389
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
10334
10390
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -10345,7 +10401,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10345
10401
|
continueRender2(pending.handle);
|
|
10346
10402
|
pendingLoadDelayRef.current = null;
|
|
10347
10403
|
}, [continueRender2]);
|
|
10348
|
-
const sourceCanvas =
|
|
10404
|
+
const sourceCanvas = useMemo32(() => {
|
|
10349
10405
|
if (typeof document === "undefined") {
|
|
10350
10406
|
return null;
|
|
10351
10407
|
}
|
|
@@ -10667,7 +10723,7 @@ var ImgContent = ({
|
|
|
10667
10723
|
const imageRef = useRef24(null);
|
|
10668
10724
|
const errors = useRef24({});
|
|
10669
10725
|
const { delayPlayback } = useBufferState();
|
|
10670
|
-
const sequenceContext =
|
|
10726
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
10671
10727
|
const [isLoading, setIsLoading] = useState18(false);
|
|
10672
10728
|
const _propsValid = true;
|
|
10673
10729
|
if (!_propsValid) {
|
|
@@ -11016,7 +11072,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
11016
11072
|
};
|
|
11017
11073
|
var interactiveElementSchema = {
|
|
11018
11074
|
...baseSchema,
|
|
11019
|
-
...transformSchema
|
|
11075
|
+
...transformSchema
|
|
11076
|
+
};
|
|
11077
|
+
var interactiveTextElementSchema = {
|
|
11078
|
+
...interactiveElementSchema,
|
|
11020
11079
|
...textSchema,
|
|
11021
11080
|
...textContentSchema
|
|
11022
11081
|
};
|
|
@@ -11032,7 +11091,7 @@ var withSchema = (options) => {
|
|
|
11032
11091
|
addSequenceStackTraces(Wrapped);
|
|
11033
11092
|
return Wrapped;
|
|
11034
11093
|
};
|
|
11035
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
11094
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
11036
11095
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
11037
11096
|
const {
|
|
11038
11097
|
durationInFrames,
|
|
@@ -11078,12 +11137,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
11078
11137
|
packageName: "remotion",
|
|
11079
11138
|
componentName: displayName.slice(1, -1)
|
|
11080
11139
|
}),
|
|
11081
|
-
schema
|
|
11140
|
+
schema,
|
|
11082
11141
|
supportsEffects: false
|
|
11083
11142
|
});
|
|
11084
11143
|
Wrapped.displayName = displayName;
|
|
11085
11144
|
return Wrapped;
|
|
11086
11145
|
};
|
|
11146
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
11147
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
11148
|
+
};
|
|
11149
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
11150
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
11151
|
+
};
|
|
11087
11152
|
var Interactive = {
|
|
11088
11153
|
baseSchema,
|
|
11089
11154
|
transformSchema,
|
|
@@ -11092,41 +11157,41 @@ var Interactive = {
|
|
|
11092
11157
|
sequenceSchema,
|
|
11093
11158
|
withSchema,
|
|
11094
11159
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
11095
|
-
A:
|
|
11096
|
-
Article:
|
|
11097
|
-
Aside:
|
|
11098
|
-
Button:
|
|
11099
|
-
Circle:
|
|
11100
|
-
Code:
|
|
11101
|
-
Div:
|
|
11102
|
-
Ellipse:
|
|
11103
|
-
Em:
|
|
11104
|
-
Footer:
|
|
11105
|
-
G:
|
|
11106
|
-
H1:
|
|
11107
|
-
H2:
|
|
11108
|
-
H3:
|
|
11109
|
-
H4:
|
|
11110
|
-
H5:
|
|
11111
|
-
H6:
|
|
11112
|
-
Header:
|
|
11113
|
-
Label:
|
|
11114
|
-
Li:
|
|
11115
|
-
Line:
|
|
11116
|
-
Main:
|
|
11117
|
-
Nav:
|
|
11118
|
-
Ol:
|
|
11119
|
-
P:
|
|
11120
|
-
Path:
|
|
11121
|
-
Pre:
|
|
11122
|
-
Rect:
|
|
11123
|
-
Section:
|
|
11124
|
-
Small:
|
|
11125
|
-
Span:
|
|
11126
|
-
Strong:
|
|
11127
|
-
Svg:
|
|
11128
|
-
Text:
|
|
11129
|
-
Ul:
|
|
11160
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
11161
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
11162
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
11163
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
11164
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
11165
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
11166
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
11167
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
11168
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
11169
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
11170
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
11171
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
11172
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
11173
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
11174
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
11175
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
11176
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
11177
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
11178
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
11179
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
11180
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
11181
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
11182
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
11183
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
11184
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
11185
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
11186
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
11187
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
11188
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
11189
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
11190
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
11191
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
11192
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
11193
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
11194
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
11130
11195
|
};
|
|
11131
11196
|
var compositionsRef = React31.createRef();
|
|
11132
11197
|
var CompositionManagerProvider = ({
|
|
@@ -11183,7 +11248,7 @@ var CompositionManagerProvider = ({
|
|
|
11183
11248
|
getCompositions: () => currentcompositionsRef.current
|
|
11184
11249
|
};
|
|
11185
11250
|
}, []);
|
|
11186
|
-
const compositionManagerSetters =
|
|
11251
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
11187
11252
|
return {
|
|
11188
11253
|
registerComposition,
|
|
11189
11254
|
unregisterComposition,
|
|
@@ -11199,7 +11264,7 @@ var CompositionManagerProvider = ({
|
|
|
11199
11264
|
unregisterFolder,
|
|
11200
11265
|
onlyRenderComposition
|
|
11201
11266
|
]);
|
|
11202
|
-
const compositionManagerContextValue =
|
|
11267
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
11203
11268
|
return {
|
|
11204
11269
|
compositions,
|
|
11205
11270
|
folders,
|
|
@@ -11297,7 +11362,7 @@ var waitForRoot = (fn) => {
|
|
|
11297
11362
|
};
|
|
11298
11363
|
var MediaEnabledContext = createContext24(null);
|
|
11299
11364
|
var useVideoEnabled = () => {
|
|
11300
|
-
const context =
|
|
11365
|
+
const context = useContext35(MediaEnabledContext);
|
|
11301
11366
|
if (!context) {
|
|
11302
11367
|
return window.remotion_videoEnabled;
|
|
11303
11368
|
}
|
|
@@ -11307,7 +11372,7 @@ var useVideoEnabled = () => {
|
|
|
11307
11372
|
return context.videoEnabled;
|
|
11308
11373
|
};
|
|
11309
11374
|
var useAudioEnabled = () => {
|
|
11310
|
-
const context =
|
|
11375
|
+
const context = useContext35(MediaEnabledContext);
|
|
11311
11376
|
if (!context) {
|
|
11312
11377
|
return window.remotion_audioEnabled;
|
|
11313
11378
|
}
|
|
@@ -11321,7 +11386,7 @@ var MediaEnabledProvider = ({
|
|
|
11321
11386
|
videoEnabled,
|
|
11322
11387
|
audioEnabled
|
|
11323
11388
|
}) => {
|
|
11324
|
-
const value =
|
|
11389
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
11325
11390
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
11326
11391
|
value,
|
|
11327
11392
|
children
|
|
@@ -11337,13 +11402,13 @@ var RemotionRootContexts = ({
|
|
|
11337
11402
|
audioEnabled,
|
|
11338
11403
|
frameState
|
|
11339
11404
|
}) => {
|
|
11340
|
-
const nonceContext =
|
|
11405
|
+
const nonceContext = useMemo35(() => {
|
|
11341
11406
|
let counter = 0;
|
|
11342
11407
|
return {
|
|
11343
11408
|
getNonce: () => counter++
|
|
11344
11409
|
};
|
|
11345
11410
|
}, []);
|
|
11346
|
-
const logging =
|
|
11411
|
+
const logging = useMemo35(() => {
|
|
11347
11412
|
return { logLevel, mountTime: Date.now() };
|
|
11348
11413
|
}, [logLevel]);
|
|
11349
11414
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -11644,13 +11709,13 @@ var OffthreadVideoForRendering = ({
|
|
|
11644
11709
|
const frame = useCurrentFrame();
|
|
11645
11710
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
11646
11711
|
const videoConfig = useUnsafeVideoConfig();
|
|
11647
|
-
const sequenceContext =
|
|
11712
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
11648
11713
|
const mediaStartsAt = useMediaStartsAt();
|
|
11649
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
11714
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
11650
11715
|
if (!src) {
|
|
11651
11716
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
11652
11717
|
}
|
|
11653
|
-
const id =
|
|
11718
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
11654
11719
|
src,
|
|
11655
11720
|
sequenceContext?.cumulatedFrom,
|
|
11656
11721
|
sequenceContext?.relativeFrom,
|
|
@@ -11705,14 +11770,14 @@ var OffthreadVideoForRendering = ({
|
|
|
11705
11770
|
sequenceContext?.cumulatedNegativeFrom,
|
|
11706
11771
|
audioStreamIndex
|
|
11707
11772
|
]);
|
|
11708
|
-
const currentTime =
|
|
11773
|
+
const currentTime = useMemo36(() => {
|
|
11709
11774
|
return getExpectedMediaFrameUncorrected({
|
|
11710
11775
|
frame,
|
|
11711
11776
|
playbackRate: playbackRate || 1,
|
|
11712
11777
|
startFrom: -mediaStartsAt
|
|
11713
11778
|
}) / videoConfig.fps;
|
|
11714
11779
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
11715
|
-
const actualSrc =
|
|
11780
|
+
const actualSrc = useMemo36(() => {
|
|
11716
11781
|
return getOffthreadVideoSource({
|
|
11717
11782
|
src,
|
|
11718
11783
|
currentTime,
|
|
@@ -11800,7 +11865,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11800
11865
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
11801
11866
|
}
|
|
11802
11867
|
}, [imageSrc, onError]);
|
|
11803
|
-
const className =
|
|
11868
|
+
const className = useMemo36(() => {
|
|
11804
11869
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
11805
11870
|
}, [props2.className]);
|
|
11806
11871
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -11864,12 +11929,12 @@ class MediaPlaybackError extends Error {
|
|
|
11864
11929
|
}
|
|
11865
11930
|
}
|
|
11866
11931
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
11867
|
-
const context =
|
|
11932
|
+
const context = useContext38(SharedAudioContext);
|
|
11868
11933
|
if (!context) {
|
|
11869
11934
|
throw new Error("SharedAudioContext not found");
|
|
11870
11935
|
}
|
|
11871
11936
|
const videoRef = useRef27(null);
|
|
11872
|
-
const sharedSource =
|
|
11937
|
+
const sharedSource = useMemo37(() => {
|
|
11873
11938
|
if (!context.audioContext) {
|
|
11874
11939
|
return null;
|
|
11875
11940
|
}
|
|
@@ -11921,7 +11986,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11921
11986
|
}
|
|
11922
11987
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
11923
11988
|
const { fps, durationInFrames } = useVideoConfig();
|
|
11924
|
-
const parentSequence =
|
|
11989
|
+
const parentSequence = useContext38(SequenceContext);
|
|
11925
11990
|
const logLevel = useLogLevel();
|
|
11926
11991
|
const mountTime = useMountTime();
|
|
11927
11992
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -12072,7 +12137,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12072
12137
|
current.preload = "auto";
|
|
12073
12138
|
}
|
|
12074
12139
|
}, []);
|
|
12075
|
-
const actualStyle =
|
|
12140
|
+
const actualStyle = useMemo37(() => {
|
|
12076
12141
|
return {
|
|
12077
12142
|
...style
|
|
12078
12143
|
};
|
|
@@ -12268,7 +12333,7 @@ function useRemotionContexts() {
|
|
|
12268
12333
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
12269
12334
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
12270
12335
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
12271
|
-
return
|
|
12336
|
+
return useMemo38(() => ({
|
|
12272
12337
|
compositionManagerCtx,
|
|
12273
12338
|
timelineContext,
|
|
12274
12339
|
setTimelineContext,
|
|
@@ -12379,6 +12444,7 @@ var Internals = {
|
|
|
12379
12444
|
textSchema,
|
|
12380
12445
|
transformSchema,
|
|
12381
12446
|
premountSchema,
|
|
12447
|
+
premountStyleSchema,
|
|
12382
12448
|
flattenActiveSchema,
|
|
12383
12449
|
getFlatSchemaWithAllKeys,
|
|
12384
12450
|
RemotionRootContexts,
|
|
@@ -12392,6 +12458,7 @@ var Internals = {
|
|
|
12392
12458
|
truthy,
|
|
12393
12459
|
SequenceContext,
|
|
12394
12460
|
PremountContext,
|
|
12461
|
+
usePremounting,
|
|
12395
12462
|
useRemotionContexts,
|
|
12396
12463
|
RemotionContextProvider,
|
|
12397
12464
|
CSSUtils: exports_default_css,
|
|
@@ -12567,7 +12634,7 @@ var validateSeriesSequenceProps = ({
|
|
|
12567
12634
|
return offset;
|
|
12568
12635
|
};
|
|
12569
12636
|
var SeriesInner = (props2) => {
|
|
12570
|
-
const childrenValue =
|
|
12637
|
+
const childrenValue = useMemo39(() => {
|
|
12571
12638
|
const flattenedChildren = flattenChildren(props2.children);
|
|
12572
12639
|
const renderChildren = (i, startFrame) => {
|
|
12573
12640
|
if (i === flattenedChildren.length) {
|
|
@@ -12896,14 +12963,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12896
12963
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12897
12964
|
const videoConfig = useUnsafeVideoConfig();
|
|
12898
12965
|
const videoRef = useRef28(null);
|
|
12899
|
-
const sequenceContext =
|
|
12966
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
12900
12967
|
const mediaStartsAt = useMediaStartsAt();
|
|
12901
12968
|
const environment = useRemotionEnvironment();
|
|
12902
12969
|
const logLevel = useLogLevel();
|
|
12903
12970
|
const mountTime = useMountTime();
|
|
12904
12971
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12905
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12906
|
-
const id =
|
|
12972
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
12973
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12907
12974
|
props2.src,
|
|
12908
12975
|
sequenceContext?.cumulatedFrom,
|
|
12909
12976
|
sequenceContext?.relativeFrom,
|
|
@@ -13114,7 +13181,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
13114
13181
|
if (environment.isClientSideRendering) {
|
|
13115
13182
|
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");
|
|
13116
13183
|
}
|
|
13117
|
-
const { durations, setDurations } =
|
|
13184
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
13118
13185
|
if (typeof ref === "string") {
|
|
13119
13186
|
throw new Error("string refs are not supported");
|
|
13120
13187
|
}
|
|
@@ -13570,7 +13637,7 @@ var ExpertCard = ({ expert, Link }) => {
|
|
|
13570
13637
|
});
|
|
13571
13638
|
};
|
|
13572
13639
|
var ExpertsPageContent = ({ Link }) => {
|
|
13573
|
-
const expertsInRandomOrder =
|
|
13640
|
+
const expertsInRandomOrder = useMemo41(() => {
|
|
13574
13641
|
if (typeof window === "undefined") {
|
|
13575
13642
|
return [];
|
|
13576
13643
|
}
|
|
@@ -13668,7 +13735,7 @@ var ExpertsPageContent = ({ Link }) => {
|
|
|
13668
13735
|
});
|
|
13669
13736
|
};
|
|
13670
13737
|
// src/components/homepage/Pricing.tsx
|
|
13671
|
-
import { useMemo as
|
|
13738
|
+
import { useMemo as useMemo54 } from "react";
|
|
13672
13739
|
|
|
13673
13740
|
// ../design/dist/esm/index.mjs
|
|
13674
13741
|
import * as React24 from "react";
|
|
@@ -15016,7 +15083,7 @@ var getDefaultConfig = () => {
|
|
|
15016
15083
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
15017
15084
|
|
|
15018
15085
|
// ../design/dist/esm/index.mjs
|
|
15019
|
-
import React33, { useEffect as useEffect21, useMemo as
|
|
15086
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo44, useState as useState23 } from "react";
|
|
15020
15087
|
|
|
15021
15088
|
// ../paths/dist/esm/index.mjs
|
|
15022
15089
|
var cutLInstruction = ({
|
|
@@ -17782,7 +17849,7 @@ var PathInternals = {
|
|
|
17782
17849
|
};
|
|
17783
17850
|
|
|
17784
17851
|
// ../shapes/dist/esm/index.mjs
|
|
17785
|
-
import React3, { useCallback as useCallback26, useMemo as
|
|
17852
|
+
import React3, { useCallback as useCallback26, useMemo as useMemo43, useRef as useRef29 } from "react";
|
|
17786
17853
|
import { version } from "react-dom";
|
|
17787
17854
|
import { jsx as jsx44, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
17788
17855
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -17964,13 +18031,13 @@ var RenderSvg = ({
|
|
|
17964
18031
|
stack,
|
|
17965
18032
|
...props
|
|
17966
18033
|
}) => {
|
|
17967
|
-
const actualStyle =
|
|
18034
|
+
const actualStyle = useMemo43(() => {
|
|
17968
18035
|
return {
|
|
17969
18036
|
overflow: "visible",
|
|
17970
18037
|
...style ?? {}
|
|
17971
18038
|
};
|
|
17972
18039
|
}, [style]);
|
|
17973
|
-
const actualPathStyle =
|
|
18040
|
+
const actualPathStyle = useMemo43(() => {
|
|
17974
18041
|
return {
|
|
17975
18042
|
transformBox: "fill-box",
|
|
17976
18043
|
...pathStyle ?? {}
|
|
@@ -20949,7 +21016,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
20949
21016
|
progress: 0,
|
|
20950
21017
|
isActive: false
|
|
20951
21018
|
});
|
|
20952
|
-
const eventTarget =
|
|
21019
|
+
const eventTarget = useMemo44(() => new EventTarget, []);
|
|
20953
21020
|
useEffect21(() => {
|
|
20954
21021
|
if (disabled) {
|
|
20955
21022
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
@@ -27396,7 +27463,7 @@ var Triangle22 = (props) => {
|
|
|
27396
27463
|
};
|
|
27397
27464
|
|
|
27398
27465
|
// src/components/homepage/FreePricing.tsx
|
|
27399
|
-
import React53, { useCallback as useCallback38, useMemo as
|
|
27466
|
+
import React53, { useCallback as useCallback38, useMemo as useMemo53 } from "react";
|
|
27400
27467
|
|
|
27401
27468
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
27402
27469
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -29053,14 +29120,14 @@ var CompanyPricing = () => {
|
|
|
29053
29120
|
}, []);
|
|
29054
29121
|
const creatorsPrice = creatorsSelected ? devSeatCount * SEAT_PRICE : 0;
|
|
29055
29122
|
const automatorsPrice = automatorsSelected ? Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE : 0;
|
|
29056
|
-
const totalPrice =
|
|
29123
|
+
const totalPrice = useMemo53(() => {
|
|
29057
29124
|
const basePrice = creatorsPrice + automatorsPrice;
|
|
29058
29125
|
if (automatorsSelected) {
|
|
29059
29126
|
return Math.max(100, basePrice);
|
|
29060
29127
|
}
|
|
29061
29128
|
return basePrice;
|
|
29062
29129
|
}, [creatorsPrice, automatorsPrice, automatorsSelected]);
|
|
29063
|
-
const totalPriceString =
|
|
29130
|
+
const totalPriceString = useMemo53(() => {
|
|
29064
29131
|
return formatPrice(totalPrice);
|
|
29065
29132
|
}, [formatPrice, totalPrice]);
|
|
29066
29133
|
const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
|
|
@@ -29290,13 +29357,13 @@ var Pricing = ({
|
|
|
29290
29357
|
licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
|
|
29291
29358
|
termsHref = "/docs/license/terms"
|
|
29292
29359
|
}) => {
|
|
29293
|
-
const faqLinkTarget =
|
|
29360
|
+
const faqLinkTarget = useMemo54(() => {
|
|
29294
29361
|
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
29295
29362
|
}, [faqHref]);
|
|
29296
|
-
const licenseLinkTarget =
|
|
29363
|
+
const licenseLinkTarget = useMemo54(() => {
|
|
29297
29364
|
return licenseHref.startsWith("http") ? "_blank" : undefined;
|
|
29298
29365
|
}, [licenseHref]);
|
|
29299
|
-
const termsLinkTarget =
|
|
29366
|
+
const termsLinkTarget = useMemo54(() => {
|
|
29300
29367
|
return termsHref.startsWith("http") ? "_blank" : undefined;
|
|
29301
29368
|
}, [termsHref]);
|
|
29302
29369
|
return /* @__PURE__ */ jsxs11("div", {
|
|
@@ -30120,13 +30187,13 @@ import { jsx as jsx59, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
|
30120
30187
|
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment13 } from "react/jsx-runtime";
|
|
30121
30188
|
import React57 from "react";
|
|
30122
30189
|
import { useContext as useContext210, useEffect as useEffect41, useState as useState40 } from "react";
|
|
30123
|
-
import { useContext as
|
|
30190
|
+
import { useContext as useContext47, useLayoutEffect as useLayoutEffect18 } from "react";
|
|
30124
30191
|
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
30125
30192
|
import { useEffect as useEffect210, useState as useState24 } from "react";
|
|
30126
30193
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
30127
|
-
import { useContext as
|
|
30194
|
+
import { useContext as useContext42, useEffect as useEffect52, useRef as useRef47 } from "react";
|
|
30128
30195
|
import { useEffect as useEffect310, useRef as useRef212 } from "react";
|
|
30129
|
-
import { useCallback as useCallback39, useContext as useContext310, useMemo as
|
|
30196
|
+
import { useCallback as useCallback39, useContext as useContext310, useMemo as useMemo55, useRef as useRef48, useState as useState310 } from "react";
|
|
30130
30197
|
import { useEffect as useEffect42, useRef as useRef310 } from "react";
|
|
30131
30198
|
import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
30132
30199
|
import {
|
|
@@ -30155,11 +30222,11 @@ import React410, { useEffect as useEffect72 } from "react";
|
|
|
30155
30222
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
30156
30223
|
import { useCallback as useCallback72, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
|
|
30157
30224
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
30158
|
-
import { useCallback as useCallback42, useMemo as
|
|
30225
|
+
import { useCallback as useCallback42, useMemo as useMemo42, useRef as useRef52, useState as useState62 } from "react";
|
|
30159
30226
|
import React54, { useCallback as useCallback310, useMemo as useMemo310, useState as useState52 } from "react";
|
|
30160
30227
|
import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
30161
30228
|
import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
30162
|
-
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as
|
|
30229
|
+
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo56, useState as useState82 } from "react";
|
|
30163
30230
|
import { useEffect as useEffect83, useRef as useRef62, useState as useState72 } from "react";
|
|
30164
30231
|
import { jsx as jsx94, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
30165
30232
|
import { useCallback as useCallback62, useEffect as useEffect102, useMemo as useMemo62, useRef as useRef72, useState as useState92 } from "react";
|
|
@@ -30900,15 +30967,19 @@ var premountSchema2 = {
|
|
|
30900
30967
|
description: "Premount For",
|
|
30901
30968
|
min: 0,
|
|
30902
30969
|
step: 1,
|
|
30903
|
-
hiddenFromList: false
|
|
30970
|
+
hiddenFromList: false,
|
|
30971
|
+
keyframable: false
|
|
30904
30972
|
},
|
|
30905
30973
|
postmountFor: {
|
|
30906
30974
|
type: "number",
|
|
30907
30975
|
default: 0,
|
|
30908
30976
|
min: 0,
|
|
30909
30977
|
step: 1,
|
|
30910
|
-
hiddenFromList: true
|
|
30911
|
-
|
|
30978
|
+
hiddenFromList: true,
|
|
30979
|
+
keyframable: false
|
|
30980
|
+
}
|
|
30981
|
+
};
|
|
30982
|
+
var premountStyleSchema2 = {
|
|
30912
30983
|
styleWhilePremounted: {
|
|
30913
30984
|
type: "hidden"
|
|
30914
30985
|
},
|
|
@@ -30916,9 +30987,13 @@ var premountSchema2 = {
|
|
|
30916
30987
|
type: "hidden"
|
|
30917
30988
|
}
|
|
30918
30989
|
};
|
|
30990
|
+
var sequencePremountSchema2 = {
|
|
30991
|
+
...premountSchema2,
|
|
30992
|
+
...premountStyleSchema2
|
|
30993
|
+
};
|
|
30919
30994
|
var sequenceStyleSchema2 = {
|
|
30920
30995
|
...transformSchema2,
|
|
30921
|
-
...
|
|
30996
|
+
...sequencePremountSchema2
|
|
30922
30997
|
};
|
|
30923
30998
|
var hiddenField2 = {
|
|
30924
30999
|
type: "boolean",
|
|
@@ -32131,7 +32206,7 @@ class ThumbnailEmitter {
|
|
|
32131
32206
|
};
|
|
32132
32207
|
}
|
|
32133
32208
|
var useBufferStateEmitter = (emitter) => {
|
|
32134
|
-
const bufferManager =
|
|
32209
|
+
const bufferManager = useContext47(Internals.BufferingContextReact);
|
|
32135
32210
|
if (!bufferManager) {
|
|
32136
32211
|
throw new Error("BufferingContextReact not found");
|
|
32137
32212
|
}
|
|
@@ -32345,7 +32420,7 @@ var usePlayer = () => {
|
|
|
32345
32420
|
const isBuffering = useCallback39(() => {
|
|
32346
32421
|
return buffering.current;
|
|
32347
32422
|
}, [buffering]);
|
|
32348
|
-
const returnValue =
|
|
32423
|
+
const returnValue = useMemo55(() => {
|
|
32349
32424
|
return {
|
|
32350
32425
|
frameBack,
|
|
32351
32426
|
frameForward,
|
|
@@ -32589,11 +32664,11 @@ var usePlayback = ({
|
|
|
32589
32664
|
const frame = Internals.Timeline.useTimelinePosition();
|
|
32590
32665
|
const { playing, pause, emitter, isPlaying } = usePlayer();
|
|
32591
32666
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
32592
|
-
const sharedAudioContext =
|
|
32667
|
+
const sharedAudioContext = useContext42(Internals.SharedAudioContext);
|
|
32593
32668
|
const logLevel = Internals.useLogLevel();
|
|
32594
32669
|
const isBackgroundedRef = useIsBackgrounded();
|
|
32595
32670
|
const lastTimeUpdateTimestamp = useRef47(0);
|
|
32596
|
-
const context =
|
|
32671
|
+
const context = useContext42(Internals.BufferingContextReact);
|
|
32597
32672
|
if (!context) {
|
|
32598
32673
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
32599
32674
|
}
|
|
@@ -33191,7 +33266,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
33191
33266
|
}
|
|
33192
33267
|
setPlayerMuted((mute) => !mute);
|
|
33193
33268
|
}, [isVolume0, setPlayerMuted, setMediaVolume]);
|
|
33194
|
-
const parentDivStyle =
|
|
33269
|
+
const parentDivStyle = useMemo42(() => {
|
|
33195
33270
|
return {
|
|
33196
33271
|
display: "inline-flex",
|
|
33197
33272
|
background: "none",
|
|
@@ -33202,7 +33277,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
33202
33277
|
...displayVerticalVolumeSlider && { position: "relative" }
|
|
33203
33278
|
};
|
|
33204
33279
|
}, [displayVerticalVolumeSlider]);
|
|
33205
|
-
const volumeContainer =
|
|
33280
|
+
const volumeContainer = useMemo42(() => {
|
|
33206
33281
|
return {
|
|
33207
33282
|
display: "inline",
|
|
33208
33283
|
width: ICON_SIZE2,
|
|
@@ -33227,10 +33302,10 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
33227
33302
|
children: isMutedOrZero ? /* @__PURE__ */ jsx84(VolumeOffIcon, {}) : /* @__PURE__ */ jsx84(VolumeOnIcon, {})
|
|
33228
33303
|
});
|
|
33229
33304
|
}, [onBlur, onClick, volumeContainer]);
|
|
33230
|
-
const muteButton =
|
|
33305
|
+
const muteButton = useMemo42(() => {
|
|
33231
33306
|
return renderMuteButton ? renderMuteButton({ muted: playerMuted, volume: mediaVolume }) : renderDefaultMuteButton({ muted: playerMuted, volume: mediaVolume });
|
|
33232
33307
|
}, [playerMuted, mediaVolume, renderDefaultMuteButton, renderMuteButton]);
|
|
33233
|
-
const volumeSlider =
|
|
33308
|
+
const volumeSlider = useMemo42(() => {
|
|
33234
33309
|
return (focused || hover) && !playerMuted && !Internals.isIosSafari() ? (renderVolumeSlider ?? renderDefaultVolumeSlider)({
|
|
33235
33310
|
isVertical: displayVerticalVolumeSlider,
|
|
33236
33311
|
volume: mediaVolume,
|
|
@@ -33318,7 +33393,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
|
|
|
33318
33393
|
setHovered(false);
|
|
33319
33394
|
}, []);
|
|
33320
33395
|
const isFocused = keyboardSelectedRate === rate;
|
|
33321
|
-
const actualStyle =
|
|
33396
|
+
const actualStyle = useMemo56(() => {
|
|
33322
33397
|
return {
|
|
33323
33398
|
...rateDiv,
|
|
33324
33399
|
backgroundColor: hovered || isFocused ? "#eee" : "transparent"
|
|
@@ -33385,7 +33460,7 @@ var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
|
33385
33460
|
setPlaybackRate(rate);
|
|
33386
33461
|
setIsComponentVisible(false);
|
|
33387
33462
|
}, [setIsComponentVisible, setPlaybackRate]);
|
|
33388
|
-
const playbackPopup =
|
|
33463
|
+
const playbackPopup = useMemo56(() => {
|
|
33389
33464
|
return {
|
|
33390
33465
|
position: "absolute",
|
|
33391
33466
|
right: 0,
|
|
@@ -35286,7 +35361,7 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
35286
35361
|
import {
|
|
35287
35362
|
useCallback as useCallback55,
|
|
35288
35363
|
useEffect as useEffect57,
|
|
35289
|
-
useMemo as
|
|
35364
|
+
useMemo as useMemo69,
|
|
35290
35365
|
useRef as useRef59,
|
|
35291
35366
|
useState as useState56
|
|
35292
35367
|
} from "react";
|
|
@@ -36037,7 +36112,7 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
36037
36112
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
36038
36113
|
|
|
36039
36114
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
36040
|
-
import React58, { useContext as useContext48, useMemo as
|
|
36115
|
+
import React58, { useContext as useContext48, useMemo as useMemo57 } from "react";
|
|
36041
36116
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
36042
36117
|
var Context = React58.createContext(undefined);
|
|
36043
36118
|
var ColorModeProvider = ({
|
|
@@ -36045,7 +36120,7 @@ var ColorModeProvider = ({
|
|
|
36045
36120
|
colorMode,
|
|
36046
36121
|
setColorMode
|
|
36047
36122
|
}) => {
|
|
36048
|
-
const value =
|
|
36123
|
+
const value = useMemo57(() => {
|
|
36049
36124
|
return { colorMode, setColorMode };
|
|
36050
36125
|
}, [colorMode, setColorMode]);
|
|
36051
36126
|
return /* @__PURE__ */ jsx60(Context.Provider, {
|
|
@@ -36063,14 +36138,14 @@ function useColorMode() {
|
|
|
36063
36138
|
|
|
36064
36139
|
// ../media/dist/esm/index.mjs
|
|
36065
36140
|
import { useMemo as useMemo312, useState as useState312 } from "react";
|
|
36066
|
-
import { useContext as useContext212, useEffect as useEffect43, useMemo as
|
|
36141
|
+
import { useContext as useContext212, useEffect as useEffect43, useMemo as useMemo59, useRef as useRef50, useState as useState41 } from "react";
|
|
36067
36142
|
import {
|
|
36068
36143
|
AudioBufferSink,
|
|
36069
36144
|
InputDisposedError
|
|
36070
36145
|
} from "mediabunny";
|
|
36071
36146
|
import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
|
|
36072
36147
|
import { CanvasSink } from "mediabunny";
|
|
36073
|
-
import { useContext as
|
|
36148
|
+
import { useContext as useContext49, useLayoutEffect as useLayoutEffect19 } from "react";
|
|
36074
36149
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
36075
36150
|
import { useContext as useContext312, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState210 } from "react";
|
|
36076
36151
|
import React211 from "react";
|
|
@@ -36089,10 +36164,10 @@ import { jsx as jsx316 } from "react/jsx-runtime";
|
|
|
36089
36164
|
import React63, { useMemo as useMemo63, useState as useState63 } from "react";
|
|
36090
36165
|
import {
|
|
36091
36166
|
useCallback as useCallback40,
|
|
36092
|
-
useContext as
|
|
36167
|
+
useContext as useContext410,
|
|
36093
36168
|
useEffect as useEffect212,
|
|
36094
36169
|
useLayoutEffect as useLayoutEffect34,
|
|
36095
|
-
useMemo as
|
|
36170
|
+
useMemo as useMemo410,
|
|
36096
36171
|
useRef as useRef213,
|
|
36097
36172
|
useState as useState43
|
|
36098
36173
|
} from "react";
|
|
@@ -36100,7 +36175,7 @@ import { jsx as jsx412 } from "react/jsx-runtime";
|
|
|
36100
36175
|
import {
|
|
36101
36176
|
useContext as useContext53,
|
|
36102
36177
|
useLayoutEffect as useLayoutEffect43,
|
|
36103
|
-
useMemo as
|
|
36178
|
+
useMemo as useMemo58,
|
|
36104
36179
|
useRef as useRef312,
|
|
36105
36180
|
useState as useState53
|
|
36106
36181
|
} from "react";
|
|
@@ -38247,7 +38322,7 @@ var useCommonEffects = ({
|
|
|
38247
38322
|
logLevel,
|
|
38248
38323
|
label: label3
|
|
38249
38324
|
}) => {
|
|
38250
|
-
const sharedAudioContext =
|
|
38325
|
+
const sharedAudioContext = useContext49(Internals.SharedAudioContext);
|
|
38251
38326
|
useLayoutEffect19(() => {
|
|
38252
38327
|
const mediaPlayer = mediaPlayerRef.current;
|
|
38253
38328
|
if (!mediaPlayer)
|
|
@@ -38400,7 +38475,8 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
38400
38475
|
onError,
|
|
38401
38476
|
credentials,
|
|
38402
38477
|
requestInit,
|
|
38403
|
-
setMediaDurationInSeconds
|
|
38478
|
+
setMediaDurationInSeconds,
|
|
38479
|
+
style: style2
|
|
38404
38480
|
}) => {
|
|
38405
38481
|
const videoConfig = useUnsafeVideoConfig2();
|
|
38406
38482
|
const frame = useCurrentFrame();
|
|
@@ -38630,6 +38706,7 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
38630
38706
|
name,
|
|
38631
38707
|
loop,
|
|
38632
38708
|
showInTimeline,
|
|
38709
|
+
style: style2 ?? undefined,
|
|
38633
38710
|
stack: stack ?? undefined,
|
|
38634
38711
|
toneFrequency,
|
|
38635
38712
|
audioStreamIndex,
|
|
@@ -38660,14 +38737,15 @@ var AudioForPreview2 = ({
|
|
|
38660
38737
|
onError,
|
|
38661
38738
|
credentials,
|
|
38662
38739
|
requestInit,
|
|
38663
|
-
setMediaDurationInSeconds
|
|
38740
|
+
setMediaDurationInSeconds,
|
|
38741
|
+
style: style2
|
|
38664
38742
|
}) => {
|
|
38665
38743
|
const preloadedSrc = usePreload2(src);
|
|
38666
38744
|
const defaultLogLevel = Internals.useLogLevel();
|
|
38667
38745
|
const frame = useCurrentFrame();
|
|
38668
38746
|
const videoConfig = useVideoConfig();
|
|
38669
38747
|
const currentTime = frame / videoConfig.fps;
|
|
38670
|
-
const showShow =
|
|
38748
|
+
const showShow = useMemo59(() => {
|
|
38671
38749
|
return getTimeInSeconds({
|
|
38672
38750
|
unloopedTimeInSeconds: currentTime,
|
|
38673
38751
|
playbackRate,
|
|
@@ -38714,7 +38792,8 @@ var AudioForPreview2 = ({
|
|
|
38714
38792
|
credentials,
|
|
38715
38793
|
requestInit,
|
|
38716
38794
|
fallbackHtml5AudioProps,
|
|
38717
|
-
setMediaDurationInSeconds
|
|
38795
|
+
setMediaDurationInSeconds,
|
|
38796
|
+
style: style2
|
|
38718
38797
|
});
|
|
38719
38798
|
};
|
|
38720
38799
|
var makeAudioCache = () => {
|
|
@@ -40807,6 +40886,7 @@ var audioSchema = {
|
|
|
40807
40886
|
keyframable: false
|
|
40808
40887
|
},
|
|
40809
40888
|
...Internals.baseSchema,
|
|
40889
|
+
...Internals.premountSchema,
|
|
40810
40890
|
volume: {
|
|
40811
40891
|
type: "number",
|
|
40812
40892
|
min: 0,
|
|
@@ -40837,6 +40917,9 @@ var AudioInner = (props) => {
|
|
|
40837
40917
|
durationInFrames,
|
|
40838
40918
|
freeze,
|
|
40839
40919
|
hidden,
|
|
40920
|
+
style: style2,
|
|
40921
|
+
premountFor,
|
|
40922
|
+
postmountFor,
|
|
40840
40923
|
...otherProps
|
|
40841
40924
|
} = props;
|
|
40842
40925
|
const environment = useRemotionEnvironment();
|
|
@@ -40879,6 +40962,24 @@ var AudioInner = (props) => {
|
|
|
40879
40962
|
type: "audio",
|
|
40880
40963
|
data: basicInfo
|
|
40881
40964
|
}), [basicInfo]);
|
|
40965
|
+
const {
|
|
40966
|
+
effectivePostmountFor,
|
|
40967
|
+
effectivePremountFor,
|
|
40968
|
+
freezeFrame,
|
|
40969
|
+
isPremountingOrPostmounting,
|
|
40970
|
+
postmountingActive,
|
|
40971
|
+
premountingActive,
|
|
40972
|
+
premountingStyle
|
|
40973
|
+
} = Internals.usePremounting({
|
|
40974
|
+
from: from ?? 0,
|
|
40975
|
+
durationInFrames: basicInfo.duration,
|
|
40976
|
+
premountFor: premountFor ?? null,
|
|
40977
|
+
postmountFor: postmountFor ?? null,
|
|
40978
|
+
style: style2 ?? null,
|
|
40979
|
+
styleWhilePremounted: null,
|
|
40980
|
+
styleWhilePostmounted: null,
|
|
40981
|
+
hideWhilePremounted: "display-none"
|
|
40982
|
+
});
|
|
40882
40983
|
if (typeof props.src !== "string") {
|
|
40883
40984
|
throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
40884
40985
|
}
|
|
@@ -40886,26 +40987,36 @@ var AudioInner = (props) => {
|
|
|
40886
40987
|
if (sequenceDurationInFrames === 0) {
|
|
40887
40988
|
return null;
|
|
40888
40989
|
}
|
|
40889
|
-
return /* @__PURE__ */ jsx316(
|
|
40890
|
-
|
|
40891
|
-
|
|
40892
|
-
|
|
40893
|
-
|
|
40894
|
-
|
|
40895
|
-
|
|
40896
|
-
|
|
40897
|
-
|
|
40898
|
-
|
|
40899
|
-
|
|
40900
|
-
|
|
40901
|
-
|
|
40902
|
-
|
|
40903
|
-
|
|
40904
|
-
|
|
40905
|
-
|
|
40906
|
-
|
|
40907
|
-
|
|
40908
|
-
|
|
40990
|
+
return /* @__PURE__ */ jsx316(Freeze, {
|
|
40991
|
+
frame: freezeFrame,
|
|
40992
|
+
active: isPremountingOrPostmounting,
|
|
40993
|
+
children: /* @__PURE__ */ jsx316(Sequence, {
|
|
40994
|
+
layout: "none",
|
|
40995
|
+
from: from ?? 0,
|
|
40996
|
+
durationInFrames: basicInfo.duration,
|
|
40997
|
+
freeze,
|
|
40998
|
+
_remotionInternalStack: stack,
|
|
40999
|
+
_remotionInternalIsMedia: isMedia,
|
|
41000
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
41001
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
41002
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
41003
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
41004
|
+
name: name ?? "<Audio>",
|
|
41005
|
+
_remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/media/audio" : undefined,
|
|
41006
|
+
controls,
|
|
41007
|
+
_remotionInternalLoopDisplay: loopDisplay,
|
|
41008
|
+
showInTimeline: showInTimeline ?? true,
|
|
41009
|
+
hidden,
|
|
41010
|
+
children: environment.isRendering ? /* @__PURE__ */ jsx316(AudioForRendering2, {
|
|
41011
|
+
...otherProps,
|
|
41012
|
+
style: premountingStyle ?? undefined
|
|
41013
|
+
}) : /* @__PURE__ */ jsx316(AudioForPreview2, {
|
|
41014
|
+
name,
|
|
41015
|
+
...otherProps,
|
|
41016
|
+
style: premountingStyle,
|
|
41017
|
+
stack: stack ?? null,
|
|
41018
|
+
setMediaDurationInSeconds
|
|
41019
|
+
})
|
|
40909
41020
|
})
|
|
40910
41021
|
});
|
|
40911
41022
|
};
|
|
@@ -40936,7 +41047,7 @@ var getVideoSequenceDuration = ({
|
|
|
40936
41047
|
};
|
|
40937
41048
|
var PRORES_DOCS_URL = "https://www.remotion.dev/docs/videos/prores";
|
|
40938
41049
|
var proresDecoderNotEnabledMessage = (src) => {
|
|
40939
|
-
return `Cannot decode "${src}": it is encoded with Apple ProRes, which WebCodecs does not support natively. ` + `ProRes decoding is not enabled by default. Register the ProRes decoder by calling ` + `registerProresDecoder() from "@mediabunny/prores" in your entry point, before registerRoot(). ` + `See ${PRORES_DOCS_URL}
|
|
41050
|
+
return `Cannot decode "${src}": it is encoded with Apple ProRes, which WebCodecs does not support natively. ` + `ProRes decoding is not enabled by default. Register the ProRes decoder by calling ` + `registerProresDecoder() from "@mediabunny/prores" in your entry point, before registerRoot(). ` + `See ${PRORES_DOCS_URL}.`;
|
|
40940
41051
|
};
|
|
40941
41052
|
|
|
40942
41053
|
class ProResDecoderNotEnabledError extends Error {
|
|
@@ -41039,7 +41150,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
41039
41150
|
const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState43(false);
|
|
41040
41151
|
const [playing] = Timeline2.usePlayingState();
|
|
41041
41152
|
const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
|
|
41042
|
-
const sharedAudioContext =
|
|
41153
|
+
const sharedAudioContext = useContext410(SharedAudioContext22);
|
|
41043
41154
|
const buffer = useBufferState();
|
|
41044
41155
|
const canvasRefCallback = useCallback40((canvas) => {
|
|
41045
41156
|
canvasRef.current = canvas;
|
|
@@ -41067,7 +41178,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
41067
41178
|
onErrorRef.current = onError;
|
|
41068
41179
|
const effectChainStateRef = useRef213(effectChainState);
|
|
41069
41180
|
effectChainStateRef.current = effectChainState;
|
|
41070
|
-
const parentSequence =
|
|
41181
|
+
const parentSequence = useContext410(SequenceContext22);
|
|
41071
41182
|
const isPremounting = Boolean(parentSequence?.premounting);
|
|
41072
41183
|
const isPostmounting = Boolean(parentSequence?.postmounting);
|
|
41073
41184
|
const sequenceOffset = (parentSequence?.absoluteFrom ?? 0) / videoConfig.fps;
|
|
@@ -41075,7 +41186,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
41075
41186
|
const currentTimeRef = useRef213(currentTime);
|
|
41076
41187
|
currentTimeRef.current = currentTime;
|
|
41077
41188
|
const preloadedSrc = usePreload22(src);
|
|
41078
|
-
const buffering =
|
|
41189
|
+
const buffering = useContext410(Internals.BufferingContextReact);
|
|
41079
41190
|
if (!buffering) {
|
|
41080
41191
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
41081
41192
|
}
|
|
@@ -41262,7 +41373,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
41262
41373
|
setMediaDurationInSeconds
|
|
41263
41374
|
]);
|
|
41264
41375
|
warnAboutObjectFitInStyleOrClassName({ style: style2, className: className2, logLevel });
|
|
41265
|
-
const classNameValue =
|
|
41376
|
+
const classNameValue = useMemo410(() => {
|
|
41266
41377
|
return [Internals.OBJECTFIT_CONTAIN_CLASS_NAME, className2].filter(Internals.truthy).join(" ");
|
|
41267
41378
|
}, [className2]);
|
|
41268
41379
|
useCommonEffects({
|
|
@@ -41309,7 +41420,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
41309
41420
|
}
|
|
41310
41421
|
mediaPlayer.redrawVideoEffects().catch(() => {});
|
|
41311
41422
|
}, [effects, mediaPlayerReady, mediaPlayerRef]);
|
|
41312
|
-
const actualStyle =
|
|
41423
|
+
const actualStyle = useMemo410(() => {
|
|
41313
41424
|
return {
|
|
41314
41425
|
...style2,
|
|
41315
41426
|
objectFit: objectFitProp
|
|
@@ -41349,7 +41460,7 @@ var VideoForPreview2 = (props) => {
|
|
|
41349
41460
|
const frame = useCurrentFrame();
|
|
41350
41461
|
const videoConfig = useVideoConfig();
|
|
41351
41462
|
const currentTime = frame / videoConfig.fps;
|
|
41352
|
-
const showShow =
|
|
41463
|
+
const showShow = useMemo410(() => {
|
|
41353
41464
|
return getTimeInSeconds({
|
|
41354
41465
|
unloopedTimeInSeconds: currentTime,
|
|
41355
41466
|
playbackRate: props.playbackRate,
|
|
@@ -41414,7 +41525,7 @@ var VideoForRendering2 = ({
|
|
|
41414
41525
|
const { registerRenderAsset, unregisterRenderAsset } = useContext53(Internals.RenderAssetManager);
|
|
41415
41526
|
const startsAt = Internals.useMediaStartsAt();
|
|
41416
41527
|
const sequenceContext = useContext53(Internals.SequenceContext);
|
|
41417
|
-
const id =
|
|
41528
|
+
const id = useMemo58(() => `media-video-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
41418
41529
|
src,
|
|
41419
41530
|
sequenceContext?.cumulatedFrom,
|
|
41420
41531
|
sequenceContext?.relativeFrom,
|
|
@@ -41633,10 +41744,10 @@ var VideoForRendering2 = ({
|
|
|
41633
41744
|
initialRequestInit
|
|
41634
41745
|
]);
|
|
41635
41746
|
warnAboutObjectFitInStyleOrClassName({ style: style2, className: className2, logLevel });
|
|
41636
|
-
const classNameValue =
|
|
41747
|
+
const classNameValue = useMemo58(() => {
|
|
41637
41748
|
return [Internals.OBJECTFIT_CONTAIN_CLASS_NAME, className2].filter(Internals.truthy).join(" ");
|
|
41638
41749
|
}, [className2]);
|
|
41639
|
-
const styleWithObjectFit =
|
|
41750
|
+
const styleWithObjectFit = useMemo58(() => {
|
|
41640
41751
|
return {
|
|
41641
41752
|
...style2,
|
|
41642
41753
|
objectFit: objectFitProp
|
|
@@ -41715,6 +41826,8 @@ var videoSchema = {
|
|
|
41715
41826
|
keyframable: false
|
|
41716
41827
|
},
|
|
41717
41828
|
...Internals.baseSchema,
|
|
41829
|
+
...Internals.premountSchema,
|
|
41830
|
+
...Internals.premountStyleSchema,
|
|
41718
41831
|
volume: {
|
|
41719
41832
|
type: "number",
|
|
41720
41833
|
min: 0,
|
|
@@ -41885,6 +41998,10 @@ var VideoInner = ({
|
|
|
41885
41998
|
from,
|
|
41886
41999
|
freeze,
|
|
41887
42000
|
hidden,
|
|
42001
|
+
premountFor,
|
|
42002
|
+
postmountFor,
|
|
42003
|
+
styleWhilePremounted,
|
|
42004
|
+
styleWhilePostmounted,
|
|
41888
42005
|
...props
|
|
41889
42006
|
}) => {
|
|
41890
42007
|
const fallbackLogLevel = Internals.useLogLevel();
|
|
@@ -41940,57 +42057,83 @@ var VideoInner = ({
|
|
|
41940
42057
|
});
|
|
41941
42058
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects ?? []);
|
|
41942
42059
|
const refForOutline = React63.useRef(null);
|
|
42060
|
+
const {
|
|
42061
|
+
effectivePostmountFor,
|
|
42062
|
+
effectivePremountFor,
|
|
42063
|
+
freezeFrame,
|
|
42064
|
+
isPremountingOrPostmounting,
|
|
42065
|
+
postmountingActive,
|
|
42066
|
+
premountingActive,
|
|
42067
|
+
premountingStyle
|
|
42068
|
+
} = Internals.usePremounting({
|
|
42069
|
+
from: from ?? 0,
|
|
42070
|
+
durationInFrames: videoSequenceDuration ?? Infinity,
|
|
42071
|
+
premountFor: premountFor ?? null,
|
|
42072
|
+
postmountFor: postmountFor ?? null,
|
|
42073
|
+
style: style2 ?? null,
|
|
42074
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
42075
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
42076
|
+
hideWhilePremounted: "display-none"
|
|
42077
|
+
});
|
|
41943
42078
|
if (sequenceDurationInFrames === 0) {
|
|
41944
42079
|
return null;
|
|
41945
42080
|
}
|
|
41946
|
-
return /* @__PURE__ */ jsx65(
|
|
41947
|
-
|
|
41948
|
-
|
|
41949
|
-
|
|
41950
|
-
|
|
41951
|
-
|
|
41952
|
-
|
|
41953
|
-
|
|
41954
|
-
|
|
41955
|
-
|
|
41956
|
-
|
|
41957
|
-
|
|
41958
|
-
|
|
41959
|
-
|
|
41960
|
-
|
|
41961
|
-
|
|
41962
|
-
...props,
|
|
41963
|
-
audioStreamIndex: audioStreamIndex ?? 0,
|
|
41964
|
-
className: className2,
|
|
41965
|
-
delayRenderRetries: delayRenderRetries ?? null,
|
|
41966
|
-
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? null,
|
|
41967
|
-
disallowFallbackToOffthreadVideo: disallowFallbackToOffthreadVideo ?? false,
|
|
41968
|
-
fallbackOffthreadVideoProps: fallbackOffthreadVideoProps ?? {},
|
|
41969
|
-
logLevel: logLevel ?? fallbackLogLevel,
|
|
41970
|
-
loop: loop ?? false,
|
|
41971
|
-
loopVolumeCurveBehavior: loopVolumeCurveBehavior ?? "repeat",
|
|
41972
|
-
muted: muted ?? false,
|
|
41973
|
-
onVideoFrame,
|
|
41974
|
-
playbackRate: playbackRate ?? 1,
|
|
41975
|
-
showInTimeline: showInTimeline ?? true,
|
|
41976
|
-
src,
|
|
41977
|
-
style: style2 ?? {},
|
|
41978
|
-
trimAfter,
|
|
41979
|
-
trimBefore,
|
|
41980
|
-
volume: volume ?? 1,
|
|
41981
|
-
toneFrequency: toneFrequency ?? 1,
|
|
41982
|
-
stack,
|
|
41983
|
-
debugOverlay: debugOverlay ?? false,
|
|
41984
|
-
headless: headless ?? false,
|
|
41985
|
-
onError,
|
|
41986
|
-
credentials,
|
|
41987
|
-
requestInit,
|
|
42081
|
+
return /* @__PURE__ */ jsx65(Freeze, {
|
|
42082
|
+
frame: freezeFrame,
|
|
42083
|
+
active: isPremountingOrPostmounting,
|
|
42084
|
+
children: /* @__PURE__ */ jsx65(Sequence, {
|
|
42085
|
+
layout: "none",
|
|
42086
|
+
from: from ?? 0,
|
|
42087
|
+
durationInFrames: videoSequenceDuration,
|
|
42088
|
+
freeze,
|
|
42089
|
+
_remotionInternalStack: stack,
|
|
42090
|
+
_remotionInternalIsMedia: isMedia,
|
|
42091
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
42092
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
42093
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
42094
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
42095
|
+
name: name ?? "<Video>",
|
|
42096
|
+
_remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/media/video" : undefined,
|
|
41988
42097
|
controls,
|
|
41989
|
-
|
|
41990
|
-
|
|
41991
|
-
|
|
41992
|
-
|
|
41993
|
-
|
|
42098
|
+
_remotionInternalLoopDisplay: loopDisplay,
|
|
42099
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
42100
|
+
outlineRef: refForOutline,
|
|
42101
|
+
showInTimeline: showInTimeline ?? true,
|
|
42102
|
+
hidden,
|
|
42103
|
+
children: /* @__PURE__ */ jsx65(InnerVideo, {
|
|
42104
|
+
...props,
|
|
42105
|
+
audioStreamIndex: audioStreamIndex ?? 0,
|
|
42106
|
+
className: className2,
|
|
42107
|
+
delayRenderRetries: delayRenderRetries ?? null,
|
|
42108
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? null,
|
|
42109
|
+
disallowFallbackToOffthreadVideo: disallowFallbackToOffthreadVideo ?? false,
|
|
42110
|
+
fallbackOffthreadVideoProps: fallbackOffthreadVideoProps ?? {},
|
|
42111
|
+
logLevel: logLevel ?? fallbackLogLevel,
|
|
42112
|
+
loop: loop ?? false,
|
|
42113
|
+
loopVolumeCurveBehavior: loopVolumeCurveBehavior ?? "repeat",
|
|
42114
|
+
muted: muted ?? false,
|
|
42115
|
+
onVideoFrame,
|
|
42116
|
+
playbackRate: playbackRate ?? 1,
|
|
42117
|
+
showInTimeline: showInTimeline ?? true,
|
|
42118
|
+
src,
|
|
42119
|
+
style: premountingStyle ?? {},
|
|
42120
|
+
trimAfter,
|
|
42121
|
+
trimBefore,
|
|
42122
|
+
volume: volume ?? 1,
|
|
42123
|
+
toneFrequency: toneFrequency ?? 1,
|
|
42124
|
+
stack,
|
|
42125
|
+
debugOverlay: debugOverlay ?? false,
|
|
42126
|
+
headless: headless ?? false,
|
|
42127
|
+
onError,
|
|
42128
|
+
credentials,
|
|
42129
|
+
requestInit,
|
|
42130
|
+
controls,
|
|
42131
|
+
objectFit: objectFit ?? "contain",
|
|
42132
|
+
_experimentalInitiallyDrawCachedFrame: _experimentalInitiallyDrawCachedFrame ?? false,
|
|
42133
|
+
effects: memoizedEffects,
|
|
42134
|
+
setMediaDurationInSeconds,
|
|
42135
|
+
refForOutline
|
|
42136
|
+
})
|
|
41994
42137
|
})
|
|
41995
42138
|
});
|
|
41996
42139
|
};
|
|
@@ -42003,7 +42146,7 @@ var Video = Interactive.withSchema({
|
|
|
42003
42146
|
});
|
|
42004
42147
|
|
|
42005
42148
|
// src/components/homepage/Demo/Comp.tsx
|
|
42006
|
-
import { useCallback as useCallback47, useEffect as useEffect49, useMemo as
|
|
42149
|
+
import { useCallback as useCallback47, useEffect as useEffect49, useMemo as useMemo64, useState as useState48 } from "react";
|
|
42007
42150
|
|
|
42008
42151
|
// src/components/homepage/Demo/Cards.tsx
|
|
42009
42152
|
import {
|
|
@@ -42555,7 +42698,7 @@ var Lottie = ({
|
|
|
42555
42698
|
};
|
|
42556
42699
|
|
|
42557
42700
|
// src/components/homepage/Demo/DisplayedEmoji.tsx
|
|
42558
|
-
import { useEffect as useEffect46, useMemo as
|
|
42701
|
+
import { useEffect as useEffect46, useMemo as useMemo60, useState as useState46 } from "react";
|
|
42559
42702
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
42560
42703
|
var DisplayedEmoji = ({ emoji }) => {
|
|
42561
42704
|
const [data, setData] = useState46(null);
|
|
@@ -42563,7 +42706,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
42563
42706
|
const [browser, setBrowser] = useState46(typeof document !== "undefined");
|
|
42564
42707
|
const { delayRender: delayRender2, continueRender, cancelRender: cancelRender2 } = useDelayRender();
|
|
42565
42708
|
const { isRendering } = useRemotionEnvironment();
|
|
42566
|
-
const src =
|
|
42709
|
+
const src = useMemo60(() => {
|
|
42567
42710
|
if (emoji === "melting") {
|
|
42568
42711
|
return "https://fonts.gstatic.com/s/e/notoemoji/latest/1fae0/lottie.json";
|
|
42569
42712
|
}
|
|
@@ -42994,7 +43137,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
|
|
|
42994
43137
|
};
|
|
42995
43138
|
|
|
42996
43139
|
// src/components/homepage/Demo/TrendingRepos.tsx
|
|
42997
|
-
import { useMemo as
|
|
43140
|
+
import { useMemo as useMemo61 } from "react";
|
|
42998
43141
|
import { jsx as jsx81, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
42999
43142
|
var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
43000
43143
|
const frame = useCurrentFrame();
|
|
@@ -43007,7 +43150,7 @@ var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
|
43007
43150
|
},
|
|
43008
43151
|
delay: number * 10 + 20
|
|
43009
43152
|
});
|
|
43010
|
-
const item =
|
|
43153
|
+
const item = useMemo61(() => {
|
|
43011
43154
|
return {
|
|
43012
43155
|
lineHeight: 1.1,
|
|
43013
43156
|
fontFamily: "GTPlanar",
|
|
@@ -43214,7 +43357,7 @@ var HomepageVideoComp = ({
|
|
|
43214
43357
|
setRerenders(rerenders + 1);
|
|
43215
43358
|
updateCardOrder(newIndices);
|
|
43216
43359
|
}, [rerenders, updateCardOrder]);
|
|
43217
|
-
const emoji =
|
|
43360
|
+
const emoji = useMemo64(() => {
|
|
43218
43361
|
if ((emojiIndex + 1e4 * 3) % 3 === 1) {
|
|
43219
43362
|
return "melting";
|
|
43220
43363
|
}
|
|
@@ -43223,7 +43366,7 @@ var HomepageVideoComp = ({
|
|
|
43223
43366
|
}
|
|
43224
43367
|
return "partying-face";
|
|
43225
43368
|
}, [emojiIndex]);
|
|
43226
|
-
const audioSrc =
|
|
43369
|
+
const audioSrc = useMemo64(() => {
|
|
43227
43370
|
if (emoji === "fire") {
|
|
43228
43371
|
return fireAudio;
|
|
43229
43372
|
}
|
|
@@ -43308,7 +43451,7 @@ import {
|
|
|
43308
43451
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
43309
43452
|
|
|
43310
43453
|
// ../core/dist/esm/version.mjs
|
|
43311
|
-
var VERSION2 = "4.0.
|
|
43454
|
+
var VERSION2 = "4.0.495";
|
|
43312
43455
|
|
|
43313
43456
|
// ../web-renderer/dist/esm/index.mjs
|
|
43314
43457
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -48532,7 +48675,7 @@ var Progress = ({ progress }) => {
|
|
|
48532
48675
|
};
|
|
48533
48676
|
|
|
48534
48677
|
// src/components/homepage/Demo/Spinner.tsx
|
|
48535
|
-
import { useMemo as
|
|
48678
|
+
import { useMemo as useMemo66 } from "react";
|
|
48536
48679
|
import { jsx as jsx97, jsxs as jsxs34, Fragment as Fragment16 } from "react/jsx-runtime";
|
|
48537
48680
|
var viewBox2 = 100;
|
|
48538
48681
|
var lines2 = 8;
|
|
@@ -48540,7 +48683,7 @@ var className2 = "__remotion_spinner_line";
|
|
|
48540
48683
|
var remotionSpinnerAnimation = "__remotion_spinner_animation";
|
|
48541
48684
|
var translated3 = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
48542
48685
|
var Spinner2 = ({ size: size4, duration }) => {
|
|
48543
|
-
const style2 =
|
|
48686
|
+
const style2 = useMemo66(() => {
|
|
48544
48687
|
return {
|
|
48545
48688
|
width: size4,
|
|
48546
48689
|
height: size4
|
|
@@ -48802,13 +48945,13 @@ var DragAndDropNudge = () => {
|
|
|
48802
48945
|
};
|
|
48803
48946
|
|
|
48804
48947
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
48805
|
-
import { useCallback as useCallback50, useEffect as useEffect51, useMemo as
|
|
48948
|
+
import { useCallback as useCallback50, useEffect as useEffect51, useMemo as useMemo68, useRef as useRef57, useState as useState51 } from "react";
|
|
48806
48949
|
|
|
48807
48950
|
// src/components/homepage/layout/use-el-size.ts
|
|
48808
|
-
import { useCallback as useCallback49, useEffect as useEffect50, useMemo as
|
|
48951
|
+
import { useCallback as useCallback49, useEffect as useEffect50, useMemo as useMemo67, useState as useState50 } from "react";
|
|
48809
48952
|
var useElementSize2 = (ref) => {
|
|
48810
48953
|
const [size4, setSize] = useState50(null);
|
|
48811
|
-
const observer =
|
|
48954
|
+
const observer = useMemo67(() => {
|
|
48812
48955
|
if (typeof ResizeObserver === "undefined") {
|
|
48813
48956
|
return;
|
|
48814
48957
|
}
|
|
@@ -49022,7 +49165,7 @@ var PlayerSeekBar2 = ({
|
|
|
49022
49165
|
body.removeEventListener("pointerup", onPointerUp);
|
|
49023
49166
|
};
|
|
49024
49167
|
}, [dragging.dragging, onPointerMove, onPointerUp]);
|
|
49025
|
-
const knobStyle =
|
|
49168
|
+
const knobStyle = useMemo68(() => {
|
|
49026
49169
|
return {
|
|
49027
49170
|
height: KNOB_SIZE3,
|
|
49028
49171
|
width: KNOB_SIZE3,
|
|
@@ -49036,7 +49179,7 @@ var PlayerSeekBar2 = ({
|
|
|
49036
49179
|
transition: "opacity 0.s ease"
|
|
49037
49180
|
};
|
|
49038
49181
|
}, [barHovered, durationInFrames, frame, width2]);
|
|
49039
|
-
const fillStyle =
|
|
49182
|
+
const fillStyle = useMemo68(() => {
|
|
49040
49183
|
return {
|
|
49041
49184
|
height: BAR_HEIGHT3,
|
|
49042
49185
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -49045,7 +49188,7 @@ var PlayerSeekBar2 = ({
|
|
|
49045
49188
|
borderRadius: BAR_HEIGHT3 / 2
|
|
49046
49189
|
};
|
|
49047
49190
|
}, [durationInFrames, frame, inFrame]);
|
|
49048
|
-
const active =
|
|
49191
|
+
const active = useMemo68(() => {
|
|
49049
49192
|
return {
|
|
49050
49193
|
height: BAR_HEIGHT3,
|
|
49051
49194
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -49459,7 +49602,7 @@ var Demo = () => {
|
|
|
49459
49602
|
const updateCardOrder = useCallback55((newCardOrder) => {
|
|
49460
49603
|
setCardOrder(newCardOrder);
|
|
49461
49604
|
}, []);
|
|
49462
|
-
const props =
|
|
49605
|
+
const props = useMemo69(() => {
|
|
49463
49606
|
return {
|
|
49464
49607
|
theme: colorMode,
|
|
49465
49608
|
onToggle: () => {
|