@remotion/promo-pages 4.0.458 → 4.0.460
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 +362 -257
- package/dist/design.js +204 -143
- package/dist/experts.js +201 -140
- package/dist/homepage/Pricing.js +204 -143
- package/dist/prompts/PromptsGallery.js +208 -147
- package/dist/prompts/PromptsShow.js +240 -179
- package/dist/prompts/PromptsSubmit.js +240 -179
- package/dist/team.js +204 -143
- package/dist/template-modal-content.js +213 -152
- package/dist/templates.js +205 -143
- package/package.json +13 -13
package/dist/experts.js
CHANGED
|
@@ -971,6 +971,7 @@ import { createContext as createContext14 } from "react";
|
|
|
971
971
|
import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
|
|
972
972
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
973
973
|
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
|
|
974
|
+
import { createContext as createContext15 } from "react";
|
|
974
975
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
975
976
|
import {
|
|
976
977
|
forwardRef as forwardRef4,
|
|
@@ -984,7 +985,7 @@ import React15, { useCallback as useCallback6, useImperativeHandle, useRef as us
|
|
|
984
985
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
985
986
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
986
987
|
import {
|
|
987
|
-
createContext as
|
|
988
|
+
createContext as createContext16,
|
|
988
989
|
forwardRef as forwardRef5,
|
|
989
990
|
useCallback as useCallback7,
|
|
990
991
|
useContext as useContext17,
|
|
@@ -996,7 +997,7 @@ import {
|
|
|
996
997
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
997
998
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
998
999
|
import {
|
|
999
|
-
createContext as
|
|
1000
|
+
createContext as createContext17,
|
|
1000
1001
|
useCallback as useCallback8,
|
|
1001
1002
|
useImperativeHandle as useImperativeHandle3,
|
|
1002
1003
|
useLayoutEffect as useLayoutEffect4,
|
|
@@ -1006,17 +1007,17 @@ import {
|
|
|
1006
1007
|
} from "react";
|
|
1007
1008
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1008
1009
|
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
|
|
1009
|
-
import React17, { createContext as
|
|
1010
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
1010
1011
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1011
1012
|
import { useContext as useContext19 } from "react";
|
|
1012
|
-
import { createContext as
|
|
1013
|
+
import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
|
|
1013
1014
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1014
|
-
import { createContext as
|
|
1015
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
1015
1016
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1016
1017
|
import React23, {
|
|
1017
1018
|
forwardRef as forwardRef6,
|
|
1018
1019
|
useContext as useContext28,
|
|
1019
|
-
useEffect as
|
|
1020
|
+
useEffect as useEffect14,
|
|
1020
1021
|
useImperativeHandle as useImperativeHandle4,
|
|
1021
1022
|
useMemo as useMemo28,
|
|
1022
1023
|
useRef as useRef18,
|
|
@@ -1024,7 +1025,7 @@ import React23, {
|
|
|
1024
1025
|
} from "react";
|
|
1025
1026
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
1026
1027
|
import React20, {
|
|
1027
|
-
createContext as
|
|
1028
|
+
createContext as createContext21,
|
|
1028
1029
|
createRef as createRef2,
|
|
1029
1030
|
useCallback as useCallback9,
|
|
1030
1031
|
useContext as useContext20,
|
|
@@ -1032,15 +1033,15 @@ import React20, {
|
|
|
1032
1033
|
useRef as useRef11,
|
|
1033
1034
|
useState as useState12
|
|
1034
1035
|
} from "react";
|
|
1035
|
-
import {
|
|
1036
|
+
import { useMemo as useMemo21 } from "react";
|
|
1036
1037
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1037
1038
|
import { useRef as useRef12 } from "react";
|
|
1038
|
-
import { useContext as useContext23, useEffect as
|
|
1039
|
+
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
|
|
1039
1040
|
import { useContext as useContext22 } from "react";
|
|
1040
1041
|
import {
|
|
1041
1042
|
useCallback as useCallback12,
|
|
1042
1043
|
useContext as useContext26,
|
|
1043
|
-
useEffect as
|
|
1044
|
+
useEffect as useEffect12,
|
|
1044
1045
|
useLayoutEffect as useLayoutEffect8,
|
|
1045
1046
|
useRef as useRef17
|
|
1046
1047
|
} from "react";
|
|
@@ -1049,7 +1050,7 @@ import { useContext as useContext25, useMemo as useMemo25 } from "react";
|
|
|
1049
1050
|
import React21, {
|
|
1050
1051
|
useCallback as useCallback10,
|
|
1051
1052
|
useContext as useContext24,
|
|
1052
|
-
useEffect as
|
|
1053
|
+
useEffect as useEffect9,
|
|
1053
1054
|
useLayoutEffect as useLayoutEffect7,
|
|
1054
1055
|
useMemo as useMemo24,
|
|
1055
1056
|
useRef as useRef14,
|
|
@@ -1057,15 +1058,15 @@ import React21, {
|
|
|
1057
1058
|
} from "react";
|
|
1058
1059
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1059
1060
|
import React22 from "react";
|
|
1060
|
-
import { useEffect as
|
|
1061
|
-
import { useEffect as
|
|
1062
|
-
import { useEffect as
|
|
1063
|
-
import { createContext as
|
|
1061
|
+
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
1062
|
+
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
1063
|
+
import { useEffect as useEffect13 } from "react";
|
|
1064
|
+
import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
|
|
1064
1065
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
1065
1066
|
import {
|
|
1066
1067
|
forwardRef as forwardRef7,
|
|
1067
1068
|
useContext as useContext29,
|
|
1068
|
-
useEffect as
|
|
1069
|
+
useEffect as useEffect15,
|
|
1069
1070
|
useImperativeHandle as useImperativeHandle5,
|
|
1070
1071
|
useLayoutEffect as useLayoutEffect9,
|
|
1071
1072
|
useMemo as useMemo29,
|
|
@@ -1096,17 +1097,16 @@ import {
|
|
|
1096
1097
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1097
1098
|
import React29 from "react";
|
|
1098
1099
|
import { useMemo as useMemo32 } from "react";
|
|
1099
|
-
import { createContext as
|
|
1100
|
+
import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
|
|
1100
1101
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1101
1102
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1102
1103
|
import React31 from "react";
|
|
1103
|
-
import React32, { createContext as
|
|
1104
|
-
import { useContext as useContext33 } from "react";
|
|
1104
|
+
import React32, { createContext as createContext24 } from "react";
|
|
1105
1105
|
import { useCallback as useCallback18 } from "react";
|
|
1106
1106
|
import {
|
|
1107
1107
|
useCallback as useCallback17,
|
|
1108
|
-
useContext as
|
|
1109
|
-
useEffect as
|
|
1108
|
+
useContext as useContext33,
|
|
1109
|
+
useEffect as useEffect16,
|
|
1110
1110
|
useLayoutEffect as useLayoutEffect11,
|
|
1111
1111
|
useMemo as useMemo33,
|
|
1112
1112
|
useState as useState20
|
|
@@ -1114,29 +1114,29 @@ import {
|
|
|
1114
1114
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1115
1115
|
import React34, {
|
|
1116
1116
|
forwardRef as forwardRef10,
|
|
1117
|
-
useContext as
|
|
1118
|
-
useEffect as
|
|
1117
|
+
useContext as useContext34,
|
|
1118
|
+
useEffect as useEffect18,
|
|
1119
1119
|
useImperativeHandle as useImperativeHandle8,
|
|
1120
1120
|
useMemo as useMemo34,
|
|
1121
1121
|
useRef as useRef22,
|
|
1122
1122
|
useState as useState21
|
|
1123
1123
|
} from "react";
|
|
1124
|
-
import { useEffect as
|
|
1124
|
+
import { useEffect as useEffect17 } from "react";
|
|
1125
1125
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1126
1126
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1127
1127
|
import React36, { useMemo as useMemo35 } from "react";
|
|
1128
1128
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1129
1129
|
import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
|
|
1130
1130
|
import React37 from "react";
|
|
1131
|
-
import React38, { createContext as
|
|
1131
|
+
import React38, { createContext as createContext25 } from "react";
|
|
1132
1132
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1133
1133
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1134
1134
|
import React40 from "react";
|
|
1135
|
-
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
1135
|
+
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
|
|
1136
1136
|
import {
|
|
1137
1137
|
forwardRef as forwardRef12,
|
|
1138
|
-
useContext as
|
|
1139
|
-
useEffect as
|
|
1138
|
+
useContext as useContext35,
|
|
1139
|
+
useEffect as useEffect19,
|
|
1140
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
1141
1141
|
useLayoutEffect as useLayoutEffect12,
|
|
1142
1142
|
useMemo as useMemo37,
|
|
@@ -2673,7 +2673,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2673
2673
|
var addSequenceStackTraces = (component) => {
|
|
2674
2674
|
componentsToAddStacksTo.push(component);
|
|
2675
2675
|
};
|
|
2676
|
-
var VERSION = "4.0.
|
|
2676
|
+
var VERSION = "4.0.460";
|
|
2677
2677
|
var checkMultipleRemotionVersions = () => {
|
|
2678
2678
|
if (typeof globalThis === "undefined") {
|
|
2679
2679
|
return;
|
|
@@ -2892,6 +2892,9 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2892
2892
|
default: "none"
|
|
2893
2893
|
}
|
|
2894
2894
|
};
|
|
2895
|
+
var nodePathToString = (nodePath) => {
|
|
2896
|
+
return nodePath.join(".");
|
|
2897
|
+
};
|
|
2895
2898
|
var SequenceManager = React12.createContext({
|
|
2896
2899
|
registerSequence: () => {
|
|
2897
2900
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -2907,19 +2910,48 @@ var SequenceVisibilityToggleContext = React12.createContext({
|
|
|
2907
2910
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
2908
2911
|
}
|
|
2909
2912
|
});
|
|
2910
|
-
var
|
|
2911
|
-
|
|
2913
|
+
var getCodeValues = (codeValues, nodePath) => {
|
|
2914
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
2915
|
+
if (!status) {
|
|
2916
|
+
return;
|
|
2917
|
+
}
|
|
2918
|
+
if (!status.canUpdate) {
|
|
2919
|
+
return;
|
|
2920
|
+
}
|
|
2921
|
+
return status.props;
|
|
2922
|
+
};
|
|
2923
|
+
var getIsJsxInMapCallback = (codeValues, nodePath) => {
|
|
2924
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
2925
|
+
if (!status) {
|
|
2926
|
+
return false;
|
|
2927
|
+
}
|
|
2928
|
+
if (!status.canUpdate) {
|
|
2929
|
+
return false;
|
|
2930
|
+
}
|
|
2931
|
+
return status.jsxInMapCallback;
|
|
2932
|
+
};
|
|
2933
|
+
var VisualModeGettersContext = React12.createContext({
|
|
2934
|
+
getDragOverrides: () => {
|
|
2935
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
2936
|
+
},
|
|
2937
|
+
getCodeValues: () => {
|
|
2938
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
2939
|
+
},
|
|
2940
|
+
getIsJsxInMapCallback: () => {
|
|
2941
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
2942
|
+
},
|
|
2943
|
+
visualModeEnabled: false
|
|
2944
|
+
});
|
|
2945
|
+
var VisualModeSettersContext = React12.createContext({
|
|
2912
2946
|
setDragOverrides: () => {
|
|
2913
|
-
throw new Error("
|
|
2947
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2914
2948
|
},
|
|
2915
2949
|
clearDragOverrides: () => {
|
|
2916
|
-
throw new Error("
|
|
2950
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2917
2951
|
},
|
|
2918
|
-
codeValues: {},
|
|
2919
2952
|
setCodeValues: () => {
|
|
2920
|
-
throw new Error("
|
|
2921
|
-
}
|
|
2922
|
-
visualModeEnabled: false
|
|
2953
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2954
|
+
}
|
|
2923
2955
|
});
|
|
2924
2956
|
var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
2925
2957
|
const [sequences, setSequences] = useState4([]);
|
|
@@ -2928,39 +2960,33 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
2928
2960
|
const controlOverridesRef = useRef6(dragOverrides);
|
|
2929
2961
|
controlOverridesRef.current = dragOverrides;
|
|
2930
2962
|
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
2931
|
-
const setDragOverrides = useCallback5((
|
|
2963
|
+
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
2932
2964
|
setControlOverrides((prev) => ({
|
|
2933
2965
|
...prev,
|
|
2934
|
-
[
|
|
2935
|
-
...prev[
|
|
2966
|
+
[nodePathToString(nodePath)]: {
|
|
2967
|
+
...prev[nodePathToString(nodePath)],
|
|
2936
2968
|
[key]: value
|
|
2937
2969
|
}
|
|
2938
2970
|
}));
|
|
2939
2971
|
}, []);
|
|
2940
|
-
const clearDragOverrides = useCallback5((
|
|
2972
|
+
const clearDragOverrides = useCallback5((nodePath) => {
|
|
2941
2973
|
setControlOverrides((prev) => {
|
|
2942
|
-
|
|
2974
|
+
const key = nodePathToString(nodePath);
|
|
2975
|
+
if (!prev[key]) {
|
|
2943
2976
|
return prev;
|
|
2944
2977
|
}
|
|
2945
2978
|
const next = { ...prev };
|
|
2946
|
-
delete next[
|
|
2979
|
+
delete next[key];
|
|
2947
2980
|
return next;
|
|
2948
2981
|
});
|
|
2949
2982
|
}, []);
|
|
2950
|
-
const setCodeValues = useCallback5((
|
|
2983
|
+
const setCodeValues = useCallback5((nodePath, values) => {
|
|
2951
2984
|
setCodeValuesMapState((prev) => {
|
|
2952
|
-
|
|
2985
|
+
const key = nodePathToString(nodePath);
|
|
2986
|
+
if (prev[key] === values) {
|
|
2953
2987
|
return prev;
|
|
2954
2988
|
}
|
|
2955
|
-
|
|
2956
|
-
if (!(sequenceId in prev)) {
|
|
2957
|
-
return prev;
|
|
2958
|
-
}
|
|
2959
|
-
const next = { ...prev };
|
|
2960
|
-
delete next[sequenceId];
|
|
2961
|
-
return next;
|
|
2962
|
-
}
|
|
2963
|
-
return { ...prev, [sequenceId]: values };
|
|
2989
|
+
return { ...prev, [key]: values };
|
|
2964
2990
|
});
|
|
2965
2991
|
}, []);
|
|
2966
2992
|
const registerSequence = useCallback5((seq) => {
|
|
@@ -2984,30 +3010,31 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
2984
3010
|
setHidden
|
|
2985
3011
|
};
|
|
2986
3012
|
}, [hidden]);
|
|
2987
|
-
const
|
|
3013
|
+
const gettersContext = useMemo14(() => {
|
|
2988
3014
|
return {
|
|
2989
3015
|
visualModeEnabled,
|
|
2990
|
-
dragOverrides,
|
|
3016
|
+
getDragOverrides: (nodePath) => dragOverrides[nodePathToString(nodePath)] ?? {},
|
|
3017
|
+
getCodeValues: (nodePath) => getCodeValues(codeValues, nodePath),
|
|
3018
|
+
getIsJsxInMapCallback: (nodePath) => getIsJsxInMapCallback(codeValues, nodePath)
|
|
3019
|
+
};
|
|
3020
|
+
}, [visualModeEnabled, dragOverrides, codeValues]);
|
|
3021
|
+
const settersContext = useMemo14(() => {
|
|
3022
|
+
return {
|
|
2991
3023
|
setDragOverrides,
|
|
2992
3024
|
clearDragOverrides,
|
|
2993
|
-
codeValues,
|
|
2994
3025
|
setCodeValues
|
|
2995
3026
|
};
|
|
2996
|
-
}, [
|
|
2997
|
-
visualModeEnabled,
|
|
2998
|
-
dragOverrides,
|
|
2999
|
-
setDragOverrides,
|
|
3000
|
-
clearDragOverrides,
|
|
3001
|
-
codeValues,
|
|
3002
|
-
setCodeValues
|
|
3003
|
-
]);
|
|
3027
|
+
}, [setDragOverrides, clearDragOverrides, setCodeValues]);
|
|
3004
3028
|
return /* @__PURE__ */ jsx11(SequenceManager.Provider, {
|
|
3005
3029
|
value: sequenceContext,
|
|
3006
3030
|
children: /* @__PURE__ */ jsx11(SequenceVisibilityToggleContext.Provider, {
|
|
3007
3031
|
value: hiddenContext,
|
|
3008
|
-
children: /* @__PURE__ */ jsx11(
|
|
3009
|
-
value:
|
|
3010
|
-
children
|
|
3032
|
+
children: /* @__PURE__ */ jsx11(VisualModeGettersContext.Provider, {
|
|
3033
|
+
value: gettersContext,
|
|
3034
|
+
children: /* @__PURE__ */ jsx11(VisualModeSettersContext.Provider, {
|
|
3035
|
+
value: settersContext,
|
|
3036
|
+
children
|
|
3037
|
+
})
|
|
3011
3038
|
})
|
|
3012
3039
|
})
|
|
3013
3040
|
});
|
|
@@ -3052,6 +3079,14 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
3052
3079
|
}
|
|
3053
3080
|
return out;
|
|
3054
3081
|
};
|
|
3082
|
+
var OverrideIdsToNodePathsGettersContext = createContext15({
|
|
3083
|
+
overrideIdToNodePathMappings: {}
|
|
3084
|
+
});
|
|
3085
|
+
var OverrideIdsToNodePathsSettersContext = createContext15({
|
|
3086
|
+
setOverrideIdToNodePath: () => {
|
|
3087
|
+
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
3088
|
+
}
|
|
3089
|
+
});
|
|
3055
3090
|
var getEffectiveVisualModeValue = ({
|
|
3056
3091
|
codeValue,
|
|
3057
3092
|
runtimeValue,
|
|
@@ -3156,6 +3191,7 @@ var mergeValues = ({
|
|
|
3156
3191
|
}
|
|
3157
3192
|
return merged;
|
|
3158
3193
|
};
|
|
3194
|
+
var stackToOverrideMap = {};
|
|
3159
3195
|
var wrapInSchema = (Component, schema) => {
|
|
3160
3196
|
if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
3161
3197
|
return Component;
|
|
@@ -3164,7 +3200,8 @@ var wrapInSchema = (Component, schema) => {
|
|
|
3164
3200
|
const flatKeys = Object.keys(flatSchema);
|
|
3165
3201
|
const Wrapped = forwardRef2((props, ref) => {
|
|
3166
3202
|
const env = useRemotionEnvironment();
|
|
3167
|
-
const { visualModeEnabled,
|
|
3203
|
+
const { visualModeEnabled, getDragOverrides, getCodeValues: getCodeValues2 } = useContext15(VisualModeGettersContext);
|
|
3204
|
+
const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
3168
3205
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
|
|
3169
3206
|
return React13.createElement(Component, {
|
|
3170
3207
|
...props,
|
|
@@ -3178,7 +3215,20 @@ var wrapInSchema = (Component, schema) => {
|
|
|
3178
3215
|
ref
|
|
3179
3216
|
});
|
|
3180
3217
|
}
|
|
3181
|
-
const [overrideId] = useState5(() =>
|
|
3218
|
+
const [overrideId] = useState5(() => {
|
|
3219
|
+
const { stack } = props;
|
|
3220
|
+
if (!stack) {
|
|
3221
|
+
return String(Math.random());
|
|
3222
|
+
}
|
|
3223
|
+
const existingOverrideId = stackToOverrideMap[stack];
|
|
3224
|
+
if (existingOverrideId) {
|
|
3225
|
+
return existingOverrideId;
|
|
3226
|
+
}
|
|
3227
|
+
const newOverrideId = String(Math.random());
|
|
3228
|
+
stackToOverrideMap[stack] = newOverrideId;
|
|
3229
|
+
return newOverrideId;
|
|
3230
|
+
});
|
|
3231
|
+
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
3182
3232
|
const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
|
|
3183
3233
|
const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
3184
3234
|
const controls = useMemo15(() => {
|
|
@@ -3192,10 +3242,15 @@ var wrapInSchema = (Component, schema) => {
|
|
|
3192
3242
|
return computeEffectiveSchemaValuesDotNotation({
|
|
3193
3243
|
schema,
|
|
3194
3244
|
currentValue: currentRuntimeValueDotNotation,
|
|
3195
|
-
overrideValues:
|
|
3196
|
-
propStatus:
|
|
3245
|
+
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
3246
|
+
propStatus: nodePath === null ? undefined : getCodeValues2(nodePath)
|
|
3197
3247
|
});
|
|
3198
|
-
}, [
|
|
3248
|
+
}, [
|
|
3249
|
+
currentRuntimeValueDotNotation,
|
|
3250
|
+
getDragOverrides,
|
|
3251
|
+
nodePath,
|
|
3252
|
+
getCodeValues2
|
|
3253
|
+
]);
|
|
3199
3254
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
3200
3255
|
const mergedProps = mergeValues({
|
|
3201
3256
|
props,
|
|
@@ -3859,7 +3914,7 @@ var defaultOnPaint = ({
|
|
|
3859
3914
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
3860
3915
|
element.style.transform = transform.toString();
|
|
3861
3916
|
};
|
|
3862
|
-
var HtmlInCanvasAncestorContext =
|
|
3917
|
+
var HtmlInCanvasAncestorContext = createContext16(false);
|
|
3863
3918
|
var HtmlInCanvasInner = forwardRef5(({
|
|
3864
3919
|
width,
|
|
3865
3920
|
height,
|
|
@@ -4076,7 +4131,7 @@ var validateRenderAsset = (artifact) => {
|
|
|
4076
4131
|
}
|
|
4077
4132
|
validateContent(artifact.content);
|
|
4078
4133
|
};
|
|
4079
|
-
var RenderAssetManager =
|
|
4134
|
+
var RenderAssetManager = createContext17({
|
|
4080
4135
|
registerRenderAsset: () => {
|
|
4081
4136
|
return;
|
|
4082
4137
|
},
|
|
@@ -4214,7 +4269,7 @@ var calculateMediaDuration = ({
|
|
|
4214
4269
|
const actualDuration = duration / playbackRate;
|
|
4215
4270
|
return Math.floor(actualDuration);
|
|
4216
4271
|
};
|
|
4217
|
-
var LoopContext =
|
|
4272
|
+
var LoopContext = createContext18(null);
|
|
4218
4273
|
var useLoop = () => {
|
|
4219
4274
|
return React17.useContext(LoopContext);
|
|
4220
4275
|
};
|
|
@@ -4285,7 +4340,7 @@ var playbackLogging = ({
|
|
|
4285
4340
|
const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
|
|
4286
4341
|
Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
|
|
4287
4342
|
};
|
|
4288
|
-
var PreloadContext =
|
|
4343
|
+
var PreloadContext = createContext19({});
|
|
4289
4344
|
var preloads = {};
|
|
4290
4345
|
var updaters = [];
|
|
4291
4346
|
var setPreloads = (updater) => {
|
|
@@ -4606,7 +4661,7 @@ var durationReducer = (state, action) => {
|
|
|
4606
4661
|
return state;
|
|
4607
4662
|
}
|
|
4608
4663
|
};
|
|
4609
|
-
var DurationsContext =
|
|
4664
|
+
var DurationsContext = createContext20({
|
|
4610
4665
|
durations: {},
|
|
4611
4666
|
setDurations: () => {
|
|
4612
4667
|
throw new Error("context missing");
|
|
@@ -4772,11 +4827,6 @@ var useSingletonAudioContext = ({
|
|
|
4772
4827
|
gainNode
|
|
4773
4828
|
};
|
|
4774
4829
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
4775
|
-
useEffect8(() => {
|
|
4776
|
-
return () => {
|
|
4777
|
-
context?.audioContext?.close();
|
|
4778
|
-
};
|
|
4779
|
-
}, [context]);
|
|
4780
4830
|
return context;
|
|
4781
4831
|
};
|
|
4782
4832
|
var waitUntilActuallyResumed = (audioContext, logLevel) => {
|
|
@@ -4825,8 +4875,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
4825
4875
|
}
|
|
4826
4876
|
return true;
|
|
4827
4877
|
};
|
|
4828
|
-
var SharedAudioContext =
|
|
4829
|
-
var SharedAudioTagsContext =
|
|
4878
|
+
var SharedAudioContext = createContext21(null);
|
|
4879
|
+
var SharedAudioTagsContext = createContext21(null);
|
|
4830
4880
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
4831
4881
|
const logLevel = useLogLevel();
|
|
4832
4882
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -4871,8 +4921,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4871
4921
|
if (!ctxAndGain) {
|
|
4872
4922
|
throw new Error("Audio context not found");
|
|
4873
4923
|
}
|
|
4924
|
+
const saveForLater = ctxAndGain.audioContext.state === "suspended" && !isResuming.current;
|
|
4874
4925
|
if (duration > 0) {
|
|
4875
|
-
if (
|
|
4926
|
+
if (saveForLater) {
|
|
4876
4927
|
nodesToResume.current.set(node, {
|
|
4877
4928
|
scheduledTime,
|
|
4878
4929
|
offset,
|
|
@@ -4890,7 +4941,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4890
4941
|
const prev = prevEndTimes.current;
|
|
4891
4942
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
4892
4943
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
4893
|
-
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "");
|
|
4944
|
+
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "actualcurrent=" + ctxAndGain.audioContext.currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "", "action=" + (saveForLater ? "schedule" : "start"), "");
|
|
4894
4945
|
prev.scheduledEndTime = scheduledEndTime;
|
|
4895
4946
|
prev.mediaEndTime = mediaEndTime;
|
|
4896
4947
|
return duration > 0 ? {
|
|
@@ -4910,6 +4961,13 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4910
4961
|
return Promise.resolve();
|
|
4911
4962
|
}
|
|
4912
4963
|
audioContextIsPlayingEventually.current = true;
|
|
4964
|
+
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
4965
|
+
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
4966
|
+
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
4967
|
+
nodesToResume.current.forEach((r, node) => {
|
|
4968
|
+
node.start(r.scheduledTime, r.offset, r.duration);
|
|
4969
|
+
});
|
|
4970
|
+
nodesToResume.current.clear();
|
|
4913
4971
|
const resumePromise = ctxAndGain.audioContext.resume();
|
|
4914
4972
|
isResuming.current = new Promise((resolve) => {
|
|
4915
4973
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
@@ -4920,11 +4978,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4920
4978
|
}).finally(() => {
|
|
4921
4979
|
isResuming.current = null;
|
|
4922
4980
|
});
|
|
4923
|
-
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
4924
|
-
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
4925
|
-
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
4926
|
-
nodesToResume.current.forEach((r, node) => node.start(r.scheduledTime, r.offset, r.duration));
|
|
4927
|
-
nodesToResume.current.clear();
|
|
4928
4981
|
return resumePromise.catch(() => {});
|
|
4929
4982
|
}, [ctxAndGain, logLevel]);
|
|
4930
4983
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
@@ -5507,7 +5560,7 @@ var useBasicMediaInTimeline = ({
|
|
|
5507
5560
|
});
|
|
5508
5561
|
}).join(",");
|
|
5509
5562
|
}, [duration, mediaStartsAt, volume, mediaVolume]);
|
|
5510
|
-
|
|
5563
|
+
useEffect8(() => {
|
|
5511
5564
|
if (typeof volume === "number" && volume !== initialVolume) {
|
|
5512
5565
|
warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`);
|
|
5513
5566
|
}
|
|
@@ -5570,7 +5623,7 @@ var useImageInTimeline = ({
|
|
|
5570
5623
|
loop: false
|
|
5571
5624
|
});
|
|
5572
5625
|
const { isStudio } = useRemotionEnvironment();
|
|
5573
|
-
|
|
5626
|
+
useEffect8(() => {
|
|
5574
5627
|
if (!src) {
|
|
5575
5628
|
throw new Error("No src passed");
|
|
5576
5629
|
}
|
|
@@ -5653,7 +5706,7 @@ var useMediaInTimeline = ({
|
|
|
5653
5706
|
loop: false
|
|
5654
5707
|
});
|
|
5655
5708
|
const { isStudio } = useRemotionEnvironment();
|
|
5656
|
-
|
|
5709
|
+
useEffect8(() => {
|
|
5657
5710
|
if (!src) {
|
|
5658
5711
|
throw new Error("No src passed");
|
|
5659
5712
|
}
|
|
@@ -5726,9 +5779,14 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
5726
5779
|
}
|
|
5727
5780
|
};
|
|
5728
5781
|
}
|
|
5782
|
+
let unblocked = false;
|
|
5729
5783
|
setBlocks((b) => [...b, block]);
|
|
5730
5784
|
return {
|
|
5731
5785
|
unblock: () => {
|
|
5786
|
+
if (unblocked) {
|
|
5787
|
+
return;
|
|
5788
|
+
}
|
|
5789
|
+
unblocked = true;
|
|
5732
5790
|
setBlocks((b) => {
|
|
5733
5791
|
const newArr = b.filter((bx) => bx !== block);
|
|
5734
5792
|
if (newArr.length === b.length) {
|
|
@@ -5755,7 +5813,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
5755
5813
|
}
|
|
5756
5814
|
};
|
|
5757
5815
|
}, []);
|
|
5758
|
-
|
|
5816
|
+
useEffect9(() => {
|
|
5759
5817
|
if (rendering) {
|
|
5760
5818
|
return;
|
|
5761
5819
|
}
|
|
@@ -5800,7 +5858,7 @@ var BufferingProvider = ({ children }) => {
|
|
|
5800
5858
|
};
|
|
5801
5859
|
var useIsPlayerBuffering = (bufferManager) => {
|
|
5802
5860
|
const [isBuffering, setIsBuffering] = useState14(bufferManager.buffering.current);
|
|
5803
|
-
|
|
5861
|
+
useEffect9(() => {
|
|
5804
5862
|
const onBuffer = () => {
|
|
5805
5863
|
setIsBuffering(true);
|
|
5806
5864
|
};
|
|
@@ -5822,18 +5880,30 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
5822
5880
|
};
|
|
5823
5881
|
var useBufferState = () => {
|
|
5824
5882
|
const buffer = useContext25(BufferingContextReact);
|
|
5883
|
+
const logLevel = useLogLevel();
|
|
5825
5884
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
5826
5885
|
return useMemo25(() => ({
|
|
5827
5886
|
delayPlayback: () => {
|
|
5828
5887
|
if (!addBlock) {
|
|
5829
5888
|
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");
|
|
5830
5889
|
}
|
|
5890
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Adding buffer handle", new Error().stack);
|
|
5831
5891
|
const { unblock } = addBlock({
|
|
5832
5892
|
id: String(Math.random())
|
|
5833
5893
|
});
|
|
5834
|
-
|
|
5894
|
+
let unblocked = false;
|
|
5895
|
+
return {
|
|
5896
|
+
unblock: () => {
|
|
5897
|
+
if (unblocked) {
|
|
5898
|
+
return;
|
|
5899
|
+
}
|
|
5900
|
+
unblocked = true;
|
|
5901
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Removing buffer handle");
|
|
5902
|
+
unblock();
|
|
5903
|
+
}
|
|
5904
|
+
};
|
|
5835
5905
|
}
|
|
5836
|
-
}), [addBlock]);
|
|
5906
|
+
}), [addBlock, logLevel]);
|
|
5837
5907
|
};
|
|
5838
5908
|
var isSafariWebkit = () => {
|
|
5839
5909
|
const isSafari2 = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
|
|
@@ -5969,7 +6039,7 @@ var useMediaBuffering = ({
|
|
|
5969
6039
|
}) => {
|
|
5970
6040
|
const buffer = useBufferState();
|
|
5971
6041
|
const [isBuffering, setIsBuffering] = useState15(false);
|
|
5972
|
-
|
|
6042
|
+
useEffect10(() => {
|
|
5973
6043
|
let cleanupFns = [];
|
|
5974
6044
|
const { current } = element;
|
|
5975
6045
|
if (!current) {
|
|
@@ -6102,7 +6172,7 @@ var useRequestVideoCallbackTime = ({
|
|
|
6102
6172
|
onVariableFpsVideoDetected
|
|
6103
6173
|
}) => {
|
|
6104
6174
|
const currentTime = useRef16(null);
|
|
6105
|
-
|
|
6175
|
+
useEffect11(() => {
|
|
6106
6176
|
const { current } = mediaRef;
|
|
6107
6177
|
if (current) {
|
|
6108
6178
|
currentTime.current = {
|
|
@@ -6388,7 +6458,7 @@ var useMediaPlayback = ({
|
|
|
6388
6458
|
return acceptableTimeshift ?? defaultAcceptableTimeshift;
|
|
6389
6459
|
})();
|
|
6390
6460
|
const isPlayerBuffering = useIsPlayerBuffering(buffering);
|
|
6391
|
-
|
|
6461
|
+
useEffect12(() => {
|
|
6392
6462
|
if (mediaRef.current?.paused) {
|
|
6393
6463
|
return;
|
|
6394
6464
|
}
|
|
@@ -6433,7 +6503,7 @@ var useMediaPlayback = ({
|
|
|
6433
6503
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
6434
6504
|
}
|
|
6435
6505
|
}, [mediaRef, playbackRate]);
|
|
6436
|
-
|
|
6506
|
+
useEffect12(() => {
|
|
6437
6507
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
6438
6508
|
if (!mediaRef.current) {
|
|
6439
6509
|
throw new Error(`No ${mediaType} ref found`);
|
|
@@ -6562,7 +6632,7 @@ var useMediaTag = ({
|
|
|
6562
6632
|
const logLevel = useLogLevel();
|
|
6563
6633
|
const mountTime = useMountTime();
|
|
6564
6634
|
const env = useRemotionEnvironment();
|
|
6565
|
-
|
|
6635
|
+
useEffect13(() => {
|
|
6566
6636
|
const tag = {
|
|
6567
6637
|
id,
|
|
6568
6638
|
play: (reason) => {
|
|
@@ -6601,11 +6671,11 @@ var useMediaTag = ({
|
|
|
6601
6671
|
env.isPlayer
|
|
6602
6672
|
]);
|
|
6603
6673
|
};
|
|
6604
|
-
var MediaVolumeContext =
|
|
6674
|
+
var MediaVolumeContext = createContext22({
|
|
6605
6675
|
mediaMuted: false,
|
|
6606
6676
|
mediaVolume: 1
|
|
6607
6677
|
});
|
|
6608
|
-
var SetMediaVolumeContext =
|
|
6678
|
+
var SetMediaVolumeContext = createContext22({
|
|
6609
6679
|
setMediaMuted: () => {
|
|
6610
6680
|
throw new Error("default");
|
|
6611
6681
|
},
|
|
@@ -6781,7 +6851,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
6781
6851
|
}, [audioRef]);
|
|
6782
6852
|
const currentOnDurationCallback = useRef18(onDuration);
|
|
6783
6853
|
currentOnDurationCallback.current = onDuration;
|
|
6784
|
-
|
|
6854
|
+
useEffect14(() => {
|
|
6785
6855
|
const { current } = audioRef;
|
|
6786
6856
|
if (!current) {
|
|
6787
6857
|
return;
|
|
@@ -6850,7 +6920,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
6850
6920
|
useImperativeHandle5(ref, () => {
|
|
6851
6921
|
return audioRef.current;
|
|
6852
6922
|
}, []);
|
|
6853
|
-
|
|
6923
|
+
useEffect15(() => {
|
|
6854
6924
|
if (!props.src) {
|
|
6855
6925
|
throw new Error("No src passed");
|
|
6856
6926
|
}
|
|
@@ -7439,7 +7509,7 @@ var waitForRoot = (fn) => {
|
|
|
7439
7509
|
listeners = listeners.filter((l) => l !== fn);
|
|
7440
7510
|
};
|
|
7441
7511
|
};
|
|
7442
|
-
var MediaEnabledContext =
|
|
7512
|
+
var MediaEnabledContext = createContext23(null);
|
|
7443
7513
|
var useVideoEnabled = () => {
|
|
7444
7514
|
const context = useContext32(MediaEnabledContext);
|
|
7445
7515
|
if (!context) {
|
|
@@ -7721,7 +7791,7 @@ var setupEnvVariables = () => {
|
|
|
7721
7791
|
});
|
|
7722
7792
|
};
|
|
7723
7793
|
var CurrentScaleContext = React32.createContext(null);
|
|
7724
|
-
var PreviewSizeContext =
|
|
7794
|
+
var PreviewSizeContext = createContext24({
|
|
7725
7795
|
setSize: () => {
|
|
7726
7796
|
return;
|
|
7727
7797
|
},
|
|
@@ -7744,14 +7814,6 @@ var calculateScale = ({
|
|
|
7744
7814
|
}
|
|
7745
7815
|
return Number(previewSize);
|
|
7746
7816
|
};
|
|
7747
|
-
var useSequenceControlOverride = (key) => {
|
|
7748
|
-
const seqContext = useContext33(SequenceContext);
|
|
7749
|
-
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
7750
|
-
if (!seqContext) {
|
|
7751
|
-
return;
|
|
7752
|
-
}
|
|
7753
|
-
return overrides[seqContext.id]?.[key];
|
|
7754
|
-
};
|
|
7755
7817
|
var getOffthreadVideoSource = ({
|
|
7756
7818
|
src,
|
|
7757
7819
|
transparent,
|
|
@@ -7783,9 +7845,9 @@ var OffthreadVideoForRendering = ({
|
|
|
7783
7845
|
const frame = useCurrentFrame();
|
|
7784
7846
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
7785
7847
|
const videoConfig = useUnsafeVideoConfig();
|
|
7786
|
-
const sequenceContext =
|
|
7848
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
7787
7849
|
const mediaStartsAt = useMediaStartsAt();
|
|
7788
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
7850
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
|
|
7789
7851
|
if (!src) {
|
|
7790
7852
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
7791
7853
|
}
|
|
@@ -7804,7 +7866,7 @@ var OffthreadVideoForRendering = ({
|
|
|
7804
7866
|
mediaVolume: 1
|
|
7805
7867
|
});
|
|
7806
7868
|
warnAboutTooHighVolume(volume);
|
|
7807
|
-
|
|
7869
|
+
useEffect16(() => {
|
|
7808
7870
|
if (!src) {
|
|
7809
7871
|
throw new Error("No src passed");
|
|
7810
7872
|
}
|
|
@@ -7965,7 +8027,7 @@ var useEmitVideoFrame = ({
|
|
|
7965
8027
|
ref,
|
|
7966
8028
|
onVideoFrame
|
|
7967
8029
|
}) => {
|
|
7968
|
-
|
|
8030
|
+
useEffect17(() => {
|
|
7969
8031
|
const { current } = ref;
|
|
7970
8032
|
if (!current) {
|
|
7971
8033
|
return;
|
|
@@ -7997,7 +8059,7 @@ class MediaPlaybackError extends Error {
|
|
|
7997
8059
|
}
|
|
7998
8060
|
}
|
|
7999
8061
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
8000
|
-
const context =
|
|
8062
|
+
const context = useContext34(SharedAudioContext);
|
|
8001
8063
|
if (!context) {
|
|
8002
8064
|
throw new Error("SharedAudioContext not found");
|
|
8003
8065
|
}
|
|
@@ -8053,8 +8115,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
8053
8115
|
}
|
|
8054
8116
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
8055
8117
|
const { fps, durationInFrames } = useVideoConfig();
|
|
8056
|
-
const parentSequence =
|
|
8057
|
-
const { hidden } =
|
|
8118
|
+
const parentSequence = useContext34(SequenceContext);
|
|
8119
|
+
const { hidden } = useContext34(SequenceVisibilityToggleContext);
|
|
8058
8120
|
const logLevel = useLogLevel();
|
|
8059
8121
|
const mountTime = useMountTime();
|
|
8060
8122
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -8129,7 +8191,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
8129
8191
|
tag: "video",
|
|
8130
8192
|
mountTime
|
|
8131
8193
|
}));
|
|
8132
|
-
|
|
8194
|
+
useEffect18(() => {
|
|
8133
8195
|
const { current } = videoRef;
|
|
8134
8196
|
if (!current) {
|
|
8135
8197
|
return;
|
|
@@ -8172,7 +8234,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
8172
8234
|
const currentOnDurationCallback = useRef22(onDuration);
|
|
8173
8235
|
currentOnDurationCallback.current = onDuration;
|
|
8174
8236
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
8175
|
-
|
|
8237
|
+
useEffect18(() => {
|
|
8176
8238
|
const { current } = videoRef;
|
|
8177
8239
|
if (!current) {
|
|
8178
8240
|
return;
|
|
@@ -8189,7 +8251,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
8189
8251
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
8190
8252
|
};
|
|
8191
8253
|
}, [src]);
|
|
8192
|
-
|
|
8254
|
+
useEffect18(() => {
|
|
8193
8255
|
const { current } = videoRef;
|
|
8194
8256
|
if (!current) {
|
|
8195
8257
|
return;
|
|
@@ -8478,7 +8540,8 @@ var Internals = {
|
|
|
8478
8540
|
VideoForPreview,
|
|
8479
8541
|
CompositionManager,
|
|
8480
8542
|
CompositionSetters,
|
|
8481
|
-
|
|
8543
|
+
VisualModeGettersContext,
|
|
8544
|
+
VisualModeSettersContext,
|
|
8482
8545
|
SequenceManager,
|
|
8483
8546
|
SequenceStackTracesUpdateContext,
|
|
8484
8547
|
SequenceVisibilityToggleContext,
|
|
@@ -8487,7 +8550,6 @@ var Internals = {
|
|
|
8487
8550
|
sequenceStyleSchema,
|
|
8488
8551
|
flattenActiveSchema,
|
|
8489
8552
|
getFlatSchemaWithAllKeys,
|
|
8490
|
-
useSequenceControlOverride,
|
|
8491
8553
|
RemotionRootContexts,
|
|
8492
8554
|
CompositionManagerProvider,
|
|
8493
8555
|
useVideo,
|
|
@@ -8580,7 +8642,9 @@ var Internals = {
|
|
|
8580
8642
|
useMemoizedEffects,
|
|
8581
8643
|
defineEffect,
|
|
8582
8644
|
createDescriptor,
|
|
8583
|
-
computeEffectiveSchemaValuesDotNotation
|
|
8645
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
8646
|
+
OverrideIdsToNodePathsGettersContext,
|
|
8647
|
+
OverrideIdsToNodePathsSettersContext
|
|
8584
8648
|
};
|
|
8585
8649
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
8586
8650
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -8618,7 +8682,7 @@ var flattenChildren = (children) => {
|
|
|
8618
8682
|
return flatChildren;
|
|
8619
8683
|
}, []);
|
|
8620
8684
|
};
|
|
8621
|
-
var IsInsideSeriesContext =
|
|
8685
|
+
var IsInsideSeriesContext = createContext25(false);
|
|
8622
8686
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
8623
8687
|
return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
|
|
8624
8688
|
value: true,
|
|
@@ -8660,9 +8724,6 @@ var SeriesInner = (props2) => {
|
|
|
8660
8724
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
8661
8725
|
}
|
|
8662
8726
|
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
8663
|
-
if (!castedChild?.props.children) {
|
|
8664
|
-
throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
|
|
8665
|
-
}
|
|
8666
8727
|
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
8667
8728
|
const {
|
|
8668
8729
|
durationInFrames,
|
|
@@ -9178,13 +9239,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
9178
9239
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
9179
9240
|
const videoConfig = useUnsafeVideoConfig();
|
|
9180
9241
|
const videoRef = useRef23(null);
|
|
9181
|
-
const sequenceContext =
|
|
9242
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
9182
9243
|
const mediaStartsAt = useMediaStartsAt();
|
|
9183
9244
|
const environment = useRemotionEnvironment();
|
|
9184
9245
|
const logLevel = useLogLevel();
|
|
9185
9246
|
const mountTime = useMountTime();
|
|
9186
9247
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9187
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9248
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
9188
9249
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9189
9250
|
props2.src,
|
|
9190
9251
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9200,7 +9261,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
9200
9261
|
mediaVolume: 1
|
|
9201
9262
|
});
|
|
9202
9263
|
warnAboutTooHighVolume(volume);
|
|
9203
|
-
|
|
9264
|
+
useEffect19(() => {
|
|
9204
9265
|
if (!props2.src) {
|
|
9205
9266
|
throw new Error("No src passed");
|
|
9206
9267
|
}
|
|
@@ -9243,7 +9304,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
9243
9304
|
useImperativeHandle9(ref, () => {
|
|
9244
9305
|
return videoRef.current;
|
|
9245
9306
|
}, []);
|
|
9246
|
-
|
|
9307
|
+
useEffect19(() => {
|
|
9247
9308
|
if (!window.remotion_videoEnabled) {
|
|
9248
9309
|
return;
|
|
9249
9310
|
}
|
|
@@ -9394,7 +9455,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
9394
9455
|
if (environment.isClientSideRendering) {
|
|
9395
9456
|
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");
|
|
9396
9457
|
}
|
|
9397
|
-
const { durations, setDurations } =
|
|
9458
|
+
const { durations, setDurations } = useContext36(DurationsContext);
|
|
9398
9459
|
if (typeof ref === "string") {
|
|
9399
9460
|
throw new Error("string refs are not supported");
|
|
9400
9461
|
}
|