@remotion/promo-pages 4.0.459 → 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 +266 -156
- package/dist/design.js +169 -103
- package/dist/experts.js +169 -103
- package/dist/homepage/Pricing.js +169 -103
- package/dist/prompts/PromptsGallery.js +169 -103
- package/dist/prompts/PromptsShow.js +203 -137
- package/dist/prompts/PromptsSubmit.js +203 -137
- package/dist/team.js +169 -103
- package/dist/template-modal-content.js +169 -103
- package/dist/templates.js +170 -103
- package/package.json +13 -13
- package/dist/cn.d.ts +0 -2
- package/dist/cn.js +0 -5
- package/dist/components/3DEngine/ButtonDemo.d.ts +0 -2
- package/dist/components/3DEngine/ButtonDemo.js +0 -43
- package/dist/components/3DEngine/Faces.d.ts +0 -5
- package/dist/components/3DEngine/Faces.js +0 -7
- package/dist/components/3DEngine/Outer.d.ts +0 -8
- package/dist/components/3DEngine/Outer.js +0 -56
- package/dist/components/3DEngine/Switch.d.ts +0 -4
- package/dist/components/3DEngine/Switch.js +0 -4
- package/dist/components/3DEngine/get-child-node-from.d.ts +0 -1
- package/dist/components/3DEngine/get-child-node-from.js +0 -14
- package/dist/components/3DEngine/hover-transforms.d.ts +0 -9
- package/dist/components/3DEngine/hover-transforms.js +0 -177
- package/dist/components/BackButton.d.ts +0 -6
- package/dist/components/BackButton.js +0 -9
- package/dist/components/CommandCopyButton.d.ts +0 -5
- package/dist/components/CommandCopyButton.js +0 -4
- package/dist/components/Homepage.d.ts +0 -6
- package/dist/components/Homepage.js +0 -20
- package/dist/components/ManageTeamMembers.d.ts +0 -2
- package/dist/components/ManageTeamMembers.js +0 -42
- package/dist/components/Spinner.d.ts +0 -3
- package/dist/components/Spinner.js +0 -4
- package/dist/components/TeamPicture.d.ts +0 -1
- package/dist/components/TeamPicture.js +0 -4
- package/dist/components/design.d.ts +0 -1
- package/dist/components/design.js +0 -33
- package/dist/components/experts/ExpertsPage.d.ts +0 -11
- package/dist/components/experts/ExpertsPage.js +0 -50
- package/dist/components/experts/experts-data.d.ts +0 -15
- package/dist/components/experts/experts-data.js +0 -289
- package/dist/components/experts/experts-icons.d.ts +0 -7
- package/dist/components/experts/experts-icons.js +0 -36
- package/dist/components/experts.d.ts +0 -3
- package/dist/components/experts.js +0 -2
- package/dist/components/homepage/BackgroundAnimation.d.ts +0 -2
- package/dist/components/homepage/BackgroundAnimation.js +0 -66
- package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
- package/dist/components/homepage/ChooseTemplate.js +0 -25
- package/dist/components/homepage/CommunityStats.d.ts +0 -3
- package/dist/components/homepage/CommunityStats.js +0 -6
- package/dist/components/homepage/CommunityStatsItems.d.ts +0 -7
- package/dist/components/homepage/CommunityStatsItems.js +0 -58
- package/dist/components/homepage/Demo/Card.d.ts +0 -15
- package/dist/components/homepage/Demo/Card.js +0 -174
- package/dist/components/homepage/Demo/Cards.d.ts +0 -15
- package/dist/components/homepage/Demo/Cards.js +0 -57
- package/dist/components/homepage/Demo/Comp.d.ts +0 -38
- package/dist/components/homepage/Demo/Comp.js +0 -72
- package/dist/components/homepage/Demo/CurrentCountry.d.ts +0 -9
- package/dist/components/homepage/Demo/CurrentCountry.js +0 -48
- package/dist/components/homepage/Demo/DemoError.d.ts +0 -2
- package/dist/components/homepage/Demo/DemoError.js +0 -10
- package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +0 -2
- package/dist/components/homepage/Demo/DemoErrorIcon.js +0 -16
- package/dist/components/homepage/Demo/DemoRender.d.ts +0 -33
- package/dist/components/homepage/Demo/DemoRender.js +0 -107
- package/dist/components/homepage/Demo/DigitWheel.d.ts +0 -9
- package/dist/components/homepage/Demo/DigitWheel.js +0 -94
- package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +0 -5
- package/dist/components/homepage/Demo/DisplayedEmoji.js +0 -59
- package/dist/components/homepage/Demo/DoneCheckmark.d.ts +0 -2
- package/dist/components/homepage/Demo/DoneCheckmark.js +0 -20
- package/dist/components/homepage/Demo/DownloadNudge.d.ts +0 -2
- package/dist/components/homepage/Demo/DownloadNudge.js +0 -27
- package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +0 -3
- package/dist/components/homepage/Demo/DragAndDropNudge.js +0 -26
- package/dist/components/homepage/Demo/EmojiCard.d.ts +0 -10
- package/dist/components/homepage/Demo/EmojiCard.js +0 -120
- package/dist/components/homepage/Demo/Minus.d.ts +0 -5
- package/dist/components/homepage/Demo/Minus.js +0 -11
- package/dist/components/homepage/Demo/PlayPauseButton.d.ts +0 -5
- package/dist/components/homepage/Demo/PlayPauseButton.js +0 -47
- package/dist/components/homepage/Demo/PlayerControls.d.ts +0 -8
- package/dist/components/homepage/Demo/PlayerControls.js +0 -15
- package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +0 -11
- package/dist/components/homepage/Demo/PlayerSeekBar.js +0 -216
- package/dist/components/homepage/Demo/PlayerVolume.d.ts +0 -5
- package/dist/components/homepage/Demo/PlayerVolume.js +0 -53
- package/dist/components/homepage/Demo/Progress.d.ts +0 -4
- package/dist/components/homepage/Demo/Progress.js +0 -14
- package/dist/components/homepage/Demo/Spinner.d.ts +0 -5
- package/dist/components/homepage/Demo/Spinner.js +0 -37
- package/dist/components/homepage/Demo/Switcher.d.ts +0 -6
- package/dist/components/homepage/Demo/Switcher.js +0 -25
- package/dist/components/homepage/Demo/Temperature.d.ts +0 -6
- package/dist/components/homepage/Demo/Temperature.js +0 -21
- package/dist/components/homepage/Demo/TemperatureNumber.d.ts +0 -5
- package/dist/components/homepage/Demo/TemperatureNumber.js +0 -36
- package/dist/components/homepage/Demo/ThemeNudge.d.ts +0 -3
- package/dist/components/homepage/Demo/ThemeNudge.js +0 -35
- package/dist/components/homepage/Demo/TimeDisplay.d.ts +0 -6
- package/dist/components/homepage/Demo/TimeDisplay.js +0 -27
- package/dist/components/homepage/Demo/TrendingRepos.d.ts +0 -6
- package/dist/components/homepage/Demo/TrendingRepos.js +0 -65
- package/dist/components/homepage/Demo/icons.d.ts +0 -10
- package/dist/components/homepage/Demo/icons.js +0 -22
- package/dist/components/homepage/Demo/index.d.ts +0 -2
- package/dist/components/homepage/Demo/index.js +0 -95
- package/dist/components/homepage/Demo/math.d.ts +0 -10
- package/dist/components/homepage/Demo/math.js +0 -29
- package/dist/components/homepage/Demo/types.d.ts +0 -6
- package/dist/components/homepage/Demo/types.js +0 -0
- package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
- package/dist/components/homepage/EditorStarterSection.js +0 -8
- package/dist/components/homepage/EvaluateRemotion.d.ts +0 -3
- package/dist/components/homepage/EvaluateRemotion.js +0 -21
- package/dist/components/homepage/FreePricing.d.ts +0 -4
- package/dist/components/homepage/FreePricing.js +0 -133
- package/dist/components/homepage/GetStartedStrip.d.ts +0 -2
- package/dist/components/homepage/GetStartedStrip.js +0 -14
- package/dist/components/homepage/GitHubButton.d.ts +0 -2
- package/dist/components/homepage/GitHubButton.js +0 -7
- package/dist/components/homepage/IconForTemplate.d.ts +0 -6
- package/dist/components/homepage/IconForTemplate.js +0 -105
- package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
- package/dist/components/homepage/IfYouKnowReact.js +0 -23
- package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
- package/dist/components/homepage/MoreTemplatesButton.js +0 -11
- package/dist/components/homepage/MuxVideo.d.ts +0 -7
- package/dist/components/homepage/MuxVideo.js +0 -45
- package/dist/components/homepage/NewsletterButton.d.ts +0 -2
- package/dist/components/homepage/NewsletterButton.js +0 -38
- package/dist/components/homepage/ParameterizeAndEdit.d.ts +0 -2
- package/dist/components/homepage/ParameterizeAndEdit.js +0 -22
- package/dist/components/homepage/Pricing.d.ts +0 -2
- package/dist/components/homepage/Pricing.js +0 -15
- package/dist/components/homepage/PricingBulletPoint.d.ts +0 -6
- package/dist/components/homepage/PricingBulletPoint.js +0 -19
- package/dist/components/homepage/RealMp4Videos.d.ts +0 -2
- package/dist/components/homepage/RealMp4Videos.js +0 -41
- package/dist/components/homepage/Spacer.d.ts +0 -2
- package/dist/components/homepage/Spacer.js +0 -4
- package/dist/components/homepage/TemplateIcon.d.ts +0 -5
- package/dist/components/homepage/TemplateIcon.js +0 -24
- package/dist/components/homepage/TextInput.d.ts +0 -7
- package/dist/components/homepage/TextInput.js +0 -34
- package/dist/components/homepage/TrustedByBanner.d.ts +0 -2
- package/dist/components/homepage/TrustedByBanner.js +0 -27
- package/dist/components/homepage/VideoApps.d.ts +0 -4
- package/dist/components/homepage/VideoApps.js +0 -72
- package/dist/components/homepage/VideoAppsShowcase.d.ts +0 -3
- package/dist/components/homepage/VideoAppsShowcase.js +0 -139
- package/dist/components/homepage/VideoAppsTitle.d.ts +0 -4
- package/dist/components/homepage/VideoAppsTitle.js +0 -4
- package/dist/components/homepage/VideoPlayerWithControls.d.ts +0 -20
- package/dist/components/homepage/VideoPlayerWithControls.js +0 -105
- package/dist/components/homepage/WriteInReact.d.ts +0 -2
- package/dist/components/homepage/WriteInReact.js +0 -10
- package/dist/components/homepage/YouAreHere.d.ts +0 -2
- package/dist/components/homepage/YouAreHere.js +0 -23
- package/dist/components/homepage/layout/Button.d.ts +0 -22
- package/dist/components/homepage/layout/Button.js +0 -30
- package/dist/components/homepage/layout/colors.d.ts +0 -13
- package/dist/components/homepage/layout/colors.js +0 -14
- package/dist/components/homepage/layout/use-color-mode.d.ts +0 -21
- package/dist/components/homepage/layout/use-color-mode.js +0 -22
- package/dist/components/homepage/layout/use-el-size.d.ts +0 -5
- package/dist/components/homepage/layout/use-el-size.js +0 -40
- package/dist/components/homepage/layout/use-mobile-layout.d.ts +0 -1
- package/dist/components/homepage/layout/use-mobile-layout.js +0 -6
- package/dist/components/icons/blank.d.ts +0 -3
- package/dist/components/icons/blank.js +0 -4
- package/dist/components/icons/brain.d.ts +0 -2
- package/dist/components/icons/brain.js +0 -4
- package/dist/components/icons/clone.d.ts +0 -2
- package/dist/components/icons/clone.js +0 -2
- package/dist/components/icons/code-hike.d.ts +0 -3
- package/dist/components/icons/code-hike.js +0 -4
- package/dist/components/icons/cubes.d.ts +0 -3
- package/dist/components/icons/cubes.js +0 -4
- package/dist/components/icons/editor.d.ts +0 -3
- package/dist/components/icons/editor.js +0 -4
- package/dist/components/icons/electron.d.ts +0 -4
- package/dist/components/icons/electron.js +0 -4
- package/dist/components/icons/js.d.ts +0 -3
- package/dist/components/icons/js.js +0 -4
- package/dist/components/icons/music.d.ts +0 -2
- package/dist/components/icons/music.js +0 -4
- package/dist/components/icons/next.d.ts +0 -4
- package/dist/components/icons/next.js +0 -4
- package/dist/components/icons/overlay.d.ts +0 -3
- package/dist/components/icons/overlay.js +0 -4
- package/dist/components/icons/prompt-to-video.d.ts +0 -2
- package/dist/components/icons/prompt-to-video.js +0 -4
- package/dist/components/icons/recorder.d.ts +0 -3
- package/dist/components/icons/recorder.js +0 -4
- package/dist/components/icons/remix.d.ts +0 -3
- package/dist/components/icons/remix.js +0 -4
- package/dist/components/icons/render-server.d.ts +0 -3
- package/dist/components/icons/render-server.js +0 -4
- package/dist/components/icons/skia.d.ts +0 -3
- package/dist/components/icons/skia.js +0 -4
- package/dist/components/icons/stargazer.d.ts +0 -3
- package/dist/components/icons/stargazer.js +0 -4
- package/dist/components/icons/still.d.ts +0 -3
- package/dist/components/icons/still.js +0 -4
- package/dist/components/icons/tailwind.d.ts +0 -3
- package/dist/components/icons/tailwind.js +0 -4
- package/dist/components/icons/tiktok.d.ts +0 -3
- package/dist/components/icons/tiktok.js +0 -4
- package/dist/components/icons/timeline.d.ts +0 -3
- package/dist/components/icons/timeline.js +0 -4
- package/dist/components/icons/ts.d.ts +0 -3
- package/dist/components/icons/ts.js +0 -4
- package/dist/components/icons/undo.d.ts +0 -3
- package/dist/components/icons/undo.js +0 -2
- package/dist/components/icons/vercel.d.ts +0 -4
- package/dist/components/icons/vercel.js +0 -4
- package/dist/components/icons/waveform.d.ts +0 -3
- package/dist/components/icons/waveform.js +0 -4
- package/dist/components/prompts/CardLikeButton.d.ts +0 -5
- package/dist/components/prompts/CardLikeButton.js +0 -49
- package/dist/components/prompts/ClipboardIcon.d.ts +0 -5
- package/dist/components/prompts/ClipboardIcon.js +0 -4
- package/dist/components/prompts/CopyPromptButton.d.ts +0 -4
- package/dist/components/prompts/CopyPromptButton.js +0 -13
- package/dist/components/prompts/LikeButton.d.ts +0 -5
- package/dist/components/prompts/LikeButton.js +0 -49
- package/dist/components/prompts/MuxPlayer.d.ts +0 -8
- package/dist/components/prompts/MuxPlayer.js +0 -21
- package/dist/components/prompts/NewBackButton.d.ts +0 -5
- package/dist/components/prompts/NewBackButton.js +0 -8
- package/dist/components/prompts/Page.d.ts +0 -8
- package/dist/components/prompts/Page.js +0 -7
- package/dist/components/prompts/PromptsGallery.d.ts +0 -7
- package/dist/components/prompts/PromptsGallery.js +0 -60
- package/dist/components/prompts/PromptsShow.d.ts +0 -5
- package/dist/components/prompts/PromptsShow.js +0 -17
- package/dist/components/prompts/PromptsSubmit.d.ts +0 -2
- package/dist/components/prompts/PromptsSubmit.js +0 -173
- package/dist/components/prompts/config.d.ts +0 -1
- package/dist/components/prompts/config.js +0 -1
- package/dist/components/prompts/prompt-helpers.d.ts +0 -8
- package/dist/components/prompts/prompt-helpers.js +0 -76
- package/dist/components/prompts/prompt-types.d.ts +0 -14
- package/dist/components/prompts/prompt-types.js +0 -0
- package/dist/components/prompts/use-heart-animation.d.ts +0 -5
- package/dist/components/prompts/use-heart-animation.js +0 -29
- package/dist/components/team/TeamCards.d.ts +0 -6
- package/dist/components/team/TeamCards.js +0 -19
- package/dist/components/team/TitleTeamCards.d.ts +0 -2
- package/dist/components/team/TitleTeamCards.js +0 -6
- package/dist/components/team/TrustSection.d.ts +0 -2
- package/dist/components/team/TrustSection.js +0 -59
- package/dist/components/team.d.ts +0 -3
- package/dist/components/team.js +0 -15
- package/dist/components/template-modal-content.d.ts +0 -5
- package/dist/components/template-modal-content.js +0 -73
- package/dist/components/templates.d.ts +0 -2
- package/dist/components/templates.js +0 -27
- package/dist/helpers/mobile-layout.d.ts +0 -1
- package/dist/helpers/mobile-layout.js +0 -6
- package/dist/helpers/use-el-size.d.ts +0 -5
- package/dist/helpers/use-el-size.js +0 -40
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -6
- package/dist/prompts-show.d.ts +0 -1
- package/dist/prompts-show.js +0 -20
- package/dist/prompts-submit.d.ts +0 -1
- package/dist/prompts-submit.js +0 -6
- package/dist/prompts.d.ts +0 -1
- package/dist/prompts.js +0 -6
- package/dist/team.d.ts +0 -1
package/dist/Homepage.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,12 +1007,12 @@ 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,
|
|
@@ -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,
|
|
@@ -1060,7 +1061,7 @@ import React22 from "react";
|
|
|
1060
1061
|
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
1061
1062
|
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
1062
1063
|
import { useEffect as useEffect13 } from "react";
|
|
1063
|
-
import { createContext as
|
|
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,
|
|
@@ -1096,16 +1097,15 @@ 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
|
|
1108
|
+
useContext as useContext33,
|
|
1109
1109
|
useEffect as useEffect16,
|
|
1110
1110
|
useLayoutEffect as useLayoutEffect11,
|
|
1111
1111
|
useMemo as useMemo33,
|
|
@@ -1114,7 +1114,7 @@ import {
|
|
|
1114
1114
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1115
1115
|
import React34, {
|
|
1116
1116
|
forwardRef as forwardRef10,
|
|
1117
|
-
useContext as
|
|
1117
|
+
useContext as useContext34,
|
|
1118
1118
|
useEffect as useEffect18,
|
|
1119
1119
|
useImperativeHandle as useImperativeHandle8,
|
|
1120
1120
|
useMemo as useMemo34,
|
|
@@ -1128,14 +1128,14 @@ 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
|
|
1138
|
+
useContext as useContext35,
|
|
1139
1139
|
useEffect as useEffect19,
|
|
1140
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
1141
1141
|
useLayoutEffect as useLayoutEffect12,
|
|
@@ -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");
|
|
@@ -4820,8 +4875,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
4820
4875
|
}
|
|
4821
4876
|
return true;
|
|
4822
4877
|
};
|
|
4823
|
-
var SharedAudioContext =
|
|
4824
|
-
var SharedAudioTagsContext =
|
|
4878
|
+
var SharedAudioContext = createContext21(null);
|
|
4879
|
+
var SharedAudioTagsContext = createContext21(null);
|
|
4825
4880
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
4826
4881
|
const logLevel = useLogLevel();
|
|
4827
4882
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -4866,8 +4921,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4866
4921
|
if (!ctxAndGain) {
|
|
4867
4922
|
throw new Error("Audio context not found");
|
|
4868
4923
|
}
|
|
4924
|
+
const saveForLater = ctxAndGain.audioContext.state === "suspended" && !isResuming.current;
|
|
4869
4925
|
if (duration > 0) {
|
|
4870
|
-
if (
|
|
4926
|
+
if (saveForLater) {
|
|
4871
4927
|
nodesToResume.current.set(node, {
|
|
4872
4928
|
scheduledTime,
|
|
4873
4929
|
offset,
|
|
@@ -4885,7 +4941,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4885
4941
|
const prev = prevEndTimes.current;
|
|
4886
4942
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
4887
4943
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
4888
|
-
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"), "");
|
|
4889
4945
|
prev.scheduledEndTime = scheduledEndTime;
|
|
4890
4946
|
prev.mediaEndTime = mediaEndTime;
|
|
4891
4947
|
return duration > 0 ? {
|
|
@@ -4905,6 +4961,13 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4905
4961
|
return Promise.resolve();
|
|
4906
4962
|
}
|
|
4907
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();
|
|
4908
4971
|
const resumePromise = ctxAndGain.audioContext.resume();
|
|
4909
4972
|
isResuming.current = new Promise((resolve) => {
|
|
4910
4973
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
@@ -4915,11 +4978,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
4915
4978
|
}).finally(() => {
|
|
4916
4979
|
isResuming.current = null;
|
|
4917
4980
|
});
|
|
4918
|
-
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
4919
|
-
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
4920
|
-
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
4921
|
-
nodesToResume.current.forEach((r, node) => node.start(r.scheduledTime, r.offset, r.duration));
|
|
4922
|
-
nodesToResume.current.clear();
|
|
4923
4981
|
return resumePromise.catch(() => {});
|
|
4924
4982
|
}, [ctxAndGain, logLevel]);
|
|
4925
4983
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
@@ -5721,9 +5779,14 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
5721
5779
|
}
|
|
5722
5780
|
};
|
|
5723
5781
|
}
|
|
5782
|
+
let unblocked = false;
|
|
5724
5783
|
setBlocks((b) => [...b, block]);
|
|
5725
5784
|
return {
|
|
5726
5785
|
unblock: () => {
|
|
5786
|
+
if (unblocked) {
|
|
5787
|
+
return;
|
|
5788
|
+
}
|
|
5789
|
+
unblocked = true;
|
|
5727
5790
|
setBlocks((b) => {
|
|
5728
5791
|
const newArr = b.filter((bx) => bx !== block);
|
|
5729
5792
|
if (newArr.length === b.length) {
|
|
@@ -5817,18 +5880,30 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
5817
5880
|
};
|
|
5818
5881
|
var useBufferState = () => {
|
|
5819
5882
|
const buffer = useContext25(BufferingContextReact);
|
|
5883
|
+
const logLevel = useLogLevel();
|
|
5820
5884
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
5821
5885
|
return useMemo25(() => ({
|
|
5822
5886
|
delayPlayback: () => {
|
|
5823
5887
|
if (!addBlock) {
|
|
5824
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");
|
|
5825
5889
|
}
|
|
5890
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Adding buffer handle", new Error().stack);
|
|
5826
5891
|
const { unblock } = addBlock({
|
|
5827
5892
|
id: String(Math.random())
|
|
5828
5893
|
});
|
|
5829
|
-
|
|
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
|
+
};
|
|
5830
5905
|
}
|
|
5831
|
-
}), [addBlock]);
|
|
5906
|
+
}), [addBlock, logLevel]);
|
|
5832
5907
|
};
|
|
5833
5908
|
var isSafariWebkit = () => {
|
|
5834
5909
|
const isSafari2 = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
|
|
@@ -6596,11 +6671,11 @@ var useMediaTag = ({
|
|
|
6596
6671
|
env.isPlayer
|
|
6597
6672
|
]);
|
|
6598
6673
|
};
|
|
6599
|
-
var MediaVolumeContext =
|
|
6674
|
+
var MediaVolumeContext = createContext22({
|
|
6600
6675
|
mediaMuted: false,
|
|
6601
6676
|
mediaVolume: 1
|
|
6602
6677
|
});
|
|
6603
|
-
var SetMediaVolumeContext =
|
|
6678
|
+
var SetMediaVolumeContext = createContext22({
|
|
6604
6679
|
setMediaMuted: () => {
|
|
6605
6680
|
throw new Error("default");
|
|
6606
6681
|
},
|
|
@@ -7434,7 +7509,7 @@ var waitForRoot = (fn) => {
|
|
|
7434
7509
|
listeners = listeners.filter((l) => l !== fn);
|
|
7435
7510
|
};
|
|
7436
7511
|
};
|
|
7437
|
-
var MediaEnabledContext =
|
|
7512
|
+
var MediaEnabledContext = createContext23(null);
|
|
7438
7513
|
var useVideoEnabled = () => {
|
|
7439
7514
|
const context = useContext32(MediaEnabledContext);
|
|
7440
7515
|
if (!context) {
|
|
@@ -7716,7 +7791,7 @@ var setupEnvVariables = () => {
|
|
|
7716
7791
|
});
|
|
7717
7792
|
};
|
|
7718
7793
|
var CurrentScaleContext = React32.createContext(null);
|
|
7719
|
-
var PreviewSizeContext =
|
|
7794
|
+
var PreviewSizeContext = createContext24({
|
|
7720
7795
|
setSize: () => {
|
|
7721
7796
|
return;
|
|
7722
7797
|
},
|
|
@@ -7739,14 +7814,6 @@ var calculateScale = ({
|
|
|
7739
7814
|
}
|
|
7740
7815
|
return Number(previewSize);
|
|
7741
7816
|
};
|
|
7742
|
-
var useSequenceControlOverride = (key) => {
|
|
7743
|
-
const seqContext = useContext33(SequenceContext);
|
|
7744
|
-
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
7745
|
-
if (!seqContext) {
|
|
7746
|
-
return;
|
|
7747
|
-
}
|
|
7748
|
-
return overrides[seqContext.id]?.[key];
|
|
7749
|
-
};
|
|
7750
7817
|
var getOffthreadVideoSource = ({
|
|
7751
7818
|
src,
|
|
7752
7819
|
transparent,
|
|
@@ -7778,9 +7845,9 @@ var OffthreadVideoForRendering = ({
|
|
|
7778
7845
|
const frame = useCurrentFrame();
|
|
7779
7846
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
7780
7847
|
const videoConfig = useUnsafeVideoConfig();
|
|
7781
|
-
const sequenceContext =
|
|
7848
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
7782
7849
|
const mediaStartsAt = useMediaStartsAt();
|
|
7783
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
7850
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
|
|
7784
7851
|
if (!src) {
|
|
7785
7852
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
7786
7853
|
}
|
|
@@ -7992,7 +8059,7 @@ class MediaPlaybackError extends Error {
|
|
|
7992
8059
|
}
|
|
7993
8060
|
}
|
|
7994
8061
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
7995
|
-
const context =
|
|
8062
|
+
const context = useContext34(SharedAudioContext);
|
|
7996
8063
|
if (!context) {
|
|
7997
8064
|
throw new Error("SharedAudioContext not found");
|
|
7998
8065
|
}
|
|
@@ -8048,8 +8115,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
8048
8115
|
}
|
|
8049
8116
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
8050
8117
|
const { fps, durationInFrames } = useVideoConfig();
|
|
8051
|
-
const parentSequence =
|
|
8052
|
-
const { hidden } =
|
|
8118
|
+
const parentSequence = useContext34(SequenceContext);
|
|
8119
|
+
const { hidden } = useContext34(SequenceVisibilityToggleContext);
|
|
8053
8120
|
const logLevel = useLogLevel();
|
|
8054
8121
|
const mountTime = useMountTime();
|
|
8055
8122
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -8473,7 +8540,8 @@ var Internals = {
|
|
|
8473
8540
|
VideoForPreview,
|
|
8474
8541
|
CompositionManager,
|
|
8475
8542
|
CompositionSetters,
|
|
8476
|
-
|
|
8543
|
+
VisualModeGettersContext,
|
|
8544
|
+
VisualModeSettersContext,
|
|
8477
8545
|
SequenceManager,
|
|
8478
8546
|
SequenceStackTracesUpdateContext,
|
|
8479
8547
|
SequenceVisibilityToggleContext,
|
|
@@ -8482,7 +8550,6 @@ var Internals = {
|
|
|
8482
8550
|
sequenceStyleSchema,
|
|
8483
8551
|
flattenActiveSchema,
|
|
8484
8552
|
getFlatSchemaWithAllKeys,
|
|
8485
|
-
useSequenceControlOverride,
|
|
8486
8553
|
RemotionRootContexts,
|
|
8487
8554
|
CompositionManagerProvider,
|
|
8488
8555
|
useVideo,
|
|
@@ -8575,7 +8642,9 @@ var Internals = {
|
|
|
8575
8642
|
useMemoizedEffects,
|
|
8576
8643
|
defineEffect,
|
|
8577
8644
|
createDescriptor,
|
|
8578
|
-
computeEffectiveSchemaValuesDotNotation
|
|
8645
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
8646
|
+
OverrideIdsToNodePathsGettersContext,
|
|
8647
|
+
OverrideIdsToNodePathsSettersContext
|
|
8579
8648
|
};
|
|
8580
8649
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
8581
8650
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -8613,7 +8682,7 @@ var flattenChildren = (children) => {
|
|
|
8613
8682
|
return flatChildren;
|
|
8614
8683
|
}, []);
|
|
8615
8684
|
};
|
|
8616
|
-
var IsInsideSeriesContext =
|
|
8685
|
+
var IsInsideSeriesContext = createContext25(false);
|
|
8617
8686
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
8618
8687
|
return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
|
|
8619
8688
|
value: true,
|
|
@@ -8655,9 +8724,6 @@ var SeriesInner = (props2) => {
|
|
|
8655
8724
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
8656
8725
|
}
|
|
8657
8726
|
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
8658
|
-
if (!castedChild?.props.children) {
|
|
8659
|
-
throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
|
|
8660
|
-
}
|
|
8661
8727
|
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
8662
8728
|
const {
|
|
8663
8729
|
durationInFrames,
|
|
@@ -9173,13 +9239,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
9173
9239
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
9174
9240
|
const videoConfig = useUnsafeVideoConfig();
|
|
9175
9241
|
const videoRef = useRef23(null);
|
|
9176
|
-
const sequenceContext =
|
|
9242
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
9177
9243
|
const mediaStartsAt = useMediaStartsAt();
|
|
9178
9244
|
const environment = useRemotionEnvironment();
|
|
9179
9245
|
const logLevel = useLogLevel();
|
|
9180
9246
|
const mountTime = useMountTime();
|
|
9181
9247
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9182
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9248
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
9183
9249
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9184
9250
|
props2.src,
|
|
9185
9251
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9389,7 +9455,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
9389
9455
|
if (environment.isClientSideRendering) {
|
|
9390
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");
|
|
9391
9457
|
}
|
|
9392
|
-
const { durations, setDurations } =
|
|
9458
|
+
const { durations, setDurations } = useContext36(DurationsContext);
|
|
9393
9459
|
if (typeof ref === "string") {
|
|
9394
9460
|
throw new Error("string refs are not supported");
|
|
9395
9461
|
}
|
|
@@ -24392,7 +24458,7 @@ var InstallsPerMonth = () => {
|
|
|
24392
24458
|
},
|
|
24393
24459
|
children: [
|
|
24394
24460
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
24395
|
-
content: "
|
|
24461
|
+
content: "3M",
|
|
24396
24462
|
width: "100px",
|
|
24397
24463
|
fontSize: "2.5rem",
|
|
24398
24464
|
fontWeight: "bold"
|
|
@@ -24414,7 +24480,7 @@ var InstallsPerMonth = () => {
|
|
|
24414
24480
|
]
|
|
24415
24481
|
}),
|
|
24416
24482
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
24417
|
-
content: "installs
|
|
24483
|
+
content: "installs",
|
|
24418
24484
|
width: "75%",
|
|
24419
24485
|
fontSize: "1.0rem",
|
|
24420
24486
|
fontWeight: "bold"
|
|
@@ -24500,7 +24566,7 @@ var GitHubStars = () => {
|
|
|
24500
24566
|
width: "45px"
|
|
24501
24567
|
}),
|
|
24502
24568
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
24503
|
-
content: "
|
|
24569
|
+
content: "46k",
|
|
24504
24570
|
width: "80px",
|
|
24505
24571
|
fontSize: "2.5rem",
|
|
24506
24572
|
fontWeight: "bold"
|
|
@@ -24693,14 +24759,14 @@ import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
|
24693
24759
|
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment11 } from "react/jsx-runtime";
|
|
24694
24760
|
import React56 from "react";
|
|
24695
24761
|
import { useContext as useContext210, useEffect as useEffect42, useState as useState40 } from "react";
|
|
24696
|
-
import { useContext as
|
|
24762
|
+
import { useContext as useContext43, useLayoutEffect as useLayoutEffect17 } from "react";
|
|
24697
24763
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
24698
24764
|
import { useCallback as useCallback34, useRef as useRef42 } from "react";
|
|
24699
24765
|
import { useEffect as useEffect24, useState as useState24 } from "react";
|
|
24700
24766
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
24701
|
-
import { useContext as
|
|
24767
|
+
import { useContext as useContext44, useEffect as useEffect52, useRef as useRef52 } from "react";
|
|
24702
24768
|
import { useEffect as useEffect310, useRef as useRef310 } from "react";
|
|
24703
|
-
import { useCallback as useCallback24, useContext as
|
|
24769
|
+
import { useCallback as useCallback24, useContext as useContext38, useMemo as useMemo51, useRef as useRef26, useState as useState310 } from "react";
|
|
24704
24770
|
import { useEffect as useEffect43, useRef as useRef43 } from "react";
|
|
24705
24771
|
import { useCallback as useCallback35, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
24706
24772
|
import {
|
|
@@ -25986,7 +26052,7 @@ class ThumbnailEmitter {
|
|
|
25986
26052
|
};
|
|
25987
26053
|
}
|
|
25988
26054
|
var useBufferStateEmitter = (emitter) => {
|
|
25989
|
-
const bufferManager =
|
|
26055
|
+
const bufferManager = useContext43(Internals.BufferingContextReact);
|
|
25990
26056
|
if (!bufferManager) {
|
|
25991
26057
|
throw new Error("BufferingContextReact not found");
|
|
25992
26058
|
}
|
|
@@ -26069,21 +26135,21 @@ var usePlayer = () => {
|
|
|
26069
26135
|
const playStart = useRef26(frame);
|
|
26070
26136
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
26071
26137
|
const setTimelinePosition = Internals.Timeline.useTimelineSetFrame();
|
|
26072
|
-
const audioContext =
|
|
26073
|
-
const audioTagsContext =
|
|
26138
|
+
const audioContext = useContext38(Internals.SharedAudioContext);
|
|
26139
|
+
const audioTagsContext = useContext38(Internals.SharedAudioTagsContext);
|
|
26074
26140
|
const { audioAndVideoTags } = Internals.useTimelineContext();
|
|
26075
26141
|
const frameRef = useRef26(frame);
|
|
26076
26142
|
frameRef.current = frame;
|
|
26077
26143
|
const video = Internals.useVideo();
|
|
26078
26144
|
const config = Internals.useUnsafeVideoConfig();
|
|
26079
|
-
const emitter =
|
|
26145
|
+
const emitter = useContext38(PlayerEventEmitterContext);
|
|
26080
26146
|
const lastFrame = (config?.durationInFrames ?? 1) - 1;
|
|
26081
26147
|
const isLastFrame = frame === lastFrame;
|
|
26082
26148
|
const isFirstFrame = frame === 0;
|
|
26083
26149
|
if (!emitter) {
|
|
26084
26150
|
throw new TypeError("Expected Player event emitter context");
|
|
26085
26151
|
}
|
|
26086
|
-
const bufferingContext =
|
|
26152
|
+
const bufferingContext = useContext38(Internals.BufferingContextReact);
|
|
26087
26153
|
if (!bufferingContext) {
|
|
26088
26154
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
26089
26155
|
}
|
|
@@ -26402,17 +26468,18 @@ var setGlobalTimeAnchor = ({
|
|
|
26402
26468
|
audioSyncAnchor,
|
|
26403
26469
|
absoluteTimeInSeconds,
|
|
26404
26470
|
globalPlaybackRate,
|
|
26405
|
-
logLevel
|
|
26471
|
+
logLevel,
|
|
26472
|
+
force
|
|
26406
26473
|
}) => {
|
|
26407
26474
|
const newAnchor = audioContext.currentTime - absoluteTimeInSeconds / globalPlaybackRate;
|
|
26408
26475
|
const shift4 = (newAnchor - audioSyncAnchor.value) * globalPlaybackRate;
|
|
26409
26476
|
const { outputLatency } = audioContext;
|
|
26410
26477
|
const safeOutputLatency = outputLatency === 0 ? 0.3 : outputLatency;
|
|
26411
26478
|
const latency = audioContext.baseLatency + safeOutputLatency;
|
|
26412
|
-
if (Math.abs(shift4) < ALLOWED_GLOBAL_TIME_ANCHOR_SHIFT + latency) {
|
|
26479
|
+
if (Math.abs(shift4) < ALLOWED_GLOBAL_TIME_ANCHOR_SHIFT + latency && !force) {
|
|
26413
26480
|
return false;
|
|
26414
26481
|
}
|
|
26415
|
-
Internals.Log.verbose({ logLevel, tag: "audio-scheduling" }, "Anchor changed from %s to %s with shift %s", audioSyncAnchor.value, newAnchor, shift4);
|
|
26482
|
+
Internals.Log.verbose({ logLevel, tag: "audio-scheduling" }, "Anchor " + (force ? "forcibly " : "") + "changed from %s to %s with shift %s", audioSyncAnchor.value, newAnchor, shift4);
|
|
26416
26483
|
audioSyncAnchor.value = newAnchor;
|
|
26417
26484
|
return true;
|
|
26418
26485
|
};
|
|
@@ -26430,11 +26497,11 @@ var usePlayback = ({
|
|
|
26430
26497
|
const frame = Internals.Timeline.useTimelinePosition();
|
|
26431
26498
|
const { playing, pause, emitter, isPlaying } = usePlayer();
|
|
26432
26499
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
26433
|
-
const sharedAudioContext =
|
|
26500
|
+
const sharedAudioContext = useContext44(Internals.SharedAudioContext);
|
|
26434
26501
|
const logLevel = Internals.useLogLevel();
|
|
26435
26502
|
const isBackgroundedRef = useIsBackgrounded();
|
|
26436
26503
|
const lastTimeUpdateTimestamp = useRef52(0);
|
|
26437
|
-
const context =
|
|
26504
|
+
const context = useContext44(Internals.BufferingContextReact);
|
|
26438
26505
|
if (!context) {
|
|
26439
26506
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
26440
26507
|
}
|
|
@@ -26453,17 +26520,56 @@ var usePlayback = ({
|
|
|
26453
26520
|
if (!config) {
|
|
26454
26521
|
return;
|
|
26455
26522
|
}
|
|
26523
|
+
if (muted) {
|
|
26524
|
+
return;
|
|
26525
|
+
}
|
|
26456
26526
|
const changed = setGlobalTimeAnchor({
|
|
26457
26527
|
audioContext: sharedAudioContext.audioContext,
|
|
26458
26528
|
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
26459
26529
|
absoluteTimeInSeconds: frame / config.fps,
|
|
26460
26530
|
globalPlaybackRate: playbackRate,
|
|
26461
|
-
logLevel
|
|
26531
|
+
logLevel,
|
|
26532
|
+
force: false
|
|
26462
26533
|
});
|
|
26463
26534
|
if (changed) {
|
|
26464
26535
|
sharedAudioContext.audioSyncAnchorEmitter.dispatch("changed");
|
|
26465
26536
|
}
|
|
26466
|
-
}, [config, frame, logLevel, playbackRate, sharedAudioContext]);
|
|
26537
|
+
}, [config, frame, logLevel, playbackRate, sharedAudioContext, muted]);
|
|
26538
|
+
useLayoutEffect23(() => {
|
|
26539
|
+
const audioContext = sharedAudioContext?.audioContext;
|
|
26540
|
+
if (!audioContext) {
|
|
26541
|
+
return;
|
|
26542
|
+
}
|
|
26543
|
+
if (!config) {
|
|
26544
|
+
return;
|
|
26545
|
+
}
|
|
26546
|
+
if (muted) {
|
|
26547
|
+
return;
|
|
26548
|
+
}
|
|
26549
|
+
const callback = () => {
|
|
26550
|
+
if (audioContext.state !== "running") {
|
|
26551
|
+
setGlobalTimeAnchor({
|
|
26552
|
+
audioContext,
|
|
26553
|
+
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
26554
|
+
absoluteTimeInSeconds: getCurrentFrame() / config.fps,
|
|
26555
|
+
globalPlaybackRate: playbackRate,
|
|
26556
|
+
logLevel,
|
|
26557
|
+
force: true
|
|
26558
|
+
});
|
|
26559
|
+
}
|
|
26560
|
+
};
|
|
26561
|
+
audioContext?.addEventListener("statechange", callback);
|
|
26562
|
+
return () => {
|
|
26563
|
+
audioContext?.removeEventListener("statechange", callback);
|
|
26564
|
+
};
|
|
26565
|
+
}, [
|
|
26566
|
+
config,
|
|
26567
|
+
getCurrentFrame,
|
|
26568
|
+
logLevel,
|
|
26569
|
+
muted,
|
|
26570
|
+
playbackRate,
|
|
26571
|
+
sharedAudioContext
|
|
26572
|
+
]);
|
|
26467
26573
|
useEffect52(() => {
|
|
26468
26574
|
if (!config) {
|
|
26469
26575
|
return;
|
|
@@ -26497,7 +26603,7 @@ var usePlayback = ({
|
|
|
26497
26603
|
sharedAudioContext?.suspend?.();
|
|
26498
26604
|
return;
|
|
26499
26605
|
}
|
|
26500
|
-
if (!muted) {
|
|
26606
|
+
if (!muted && !context.buffering.current) {
|
|
26501
26607
|
sharedAudioContext?.resume?.();
|
|
26502
26608
|
}
|
|
26503
26609
|
const time = performance.now() - startedTime;
|
|
@@ -26515,7 +26621,7 @@ var usePlayback = ({
|
|
|
26515
26621
|
shouldLoop: loop
|
|
26516
26622
|
});
|
|
26517
26623
|
framesAdvanced += framesToAdvance;
|
|
26518
|
-
if (nextFrame !== getCurrentFrame() && (!hasEnded || moveToBeginningWhenEnded)) {
|
|
26624
|
+
if (nextFrame !== getCurrentFrame() && (!hasEnded || moveToBeginningWhenEnded) && !context.buffering.current) {
|
|
26519
26625
|
setFrame((c) => ({ ...c, [config.id]: nextFrame }));
|
|
26520
26626
|
}
|
|
26521
26627
|
if (hasEnded) {
|
|
@@ -26530,27 +26636,16 @@ var usePlayback = ({
|
|
|
26530
26636
|
const getIsResumingAudioContext = sharedAudioContext?.getIsResumingAudioContext?.() ?? null;
|
|
26531
26637
|
if (getIsResumingAudioContext !== null && !muted) {
|
|
26532
26638
|
getIsResumingAudioContext.then(() => {
|
|
26533
|
-
if (!sharedAudioContext?.audioContext) {
|
|
26534
|
-
return;
|
|
26535
|
-
}
|
|
26536
|
-
if (!sharedAudioContext.audioSyncAnchor) {
|
|
26537
|
-
return;
|
|
26538
|
-
}
|
|
26539
|
-
setGlobalTimeAnchor({
|
|
26540
|
-
audioContext: sharedAudioContext.audioContext,
|
|
26541
|
-
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
26542
|
-
absoluteTimeInSeconds: getCurrentFrame() / config.fps,
|
|
26543
|
-
globalPlaybackRate: playbackRate,
|
|
26544
|
-
logLevel
|
|
26545
|
-
});
|
|
26546
26639
|
startedTime = performance.now();
|
|
26547
26640
|
framesAdvanced = 0;
|
|
26548
26641
|
queueNextFrame();
|
|
26549
26642
|
});
|
|
26550
26643
|
return;
|
|
26551
26644
|
}
|
|
26552
|
-
if (context.buffering.current
|
|
26553
|
-
|
|
26645
|
+
if (context.buffering.current) {
|
|
26646
|
+
if (!muted) {
|
|
26647
|
+
sharedAudioContext?.suspend?.();
|
|
26648
|
+
}
|
|
26554
26649
|
const stopListening = context.listenForResume(() => {
|
|
26555
26650
|
stopListening.remove();
|
|
26556
26651
|
startedTime = performance.now();
|
|
@@ -29824,7 +29919,7 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
29824
29919
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
29825
29920
|
|
|
29826
29921
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
29827
|
-
import React57, { useContext as
|
|
29922
|
+
import React57, { useContext as useContext45, useMemo as useMemo53 } from "react";
|
|
29828
29923
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
29829
29924
|
var Context = React57.createContext(undefined);
|
|
29830
29925
|
var ColorModeProvider = ({
|
|
@@ -29841,7 +29936,7 @@ var ColorModeProvider = ({
|
|
|
29841
29936
|
});
|
|
29842
29937
|
};
|
|
29843
29938
|
function useColorMode() {
|
|
29844
|
-
const context =
|
|
29939
|
+
const context = useContext45(Context);
|
|
29845
29940
|
if (context === null || context === undefined) {
|
|
29846
29941
|
throw new Error("ColorModeProvider");
|
|
29847
29942
|
}
|
|
@@ -29855,9 +29950,9 @@ import { useContext as useContext212, useEffect as useEffect44, useMemo as useMe
|
|
|
29855
29950
|
import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
|
|
29856
29951
|
import { AudioBufferSink, InputDisposedError } from "mediabunny";
|
|
29857
29952
|
import { CanvasSink } from "mediabunny";
|
|
29858
|
-
import { useContext as
|
|
29953
|
+
import { useContext as useContext47, useLayoutEffect as useLayoutEffect18 } from "react";
|
|
29859
29954
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
29860
|
-
import { useContext as
|
|
29955
|
+
import { useContext as useContext310, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState210 } from "react";
|
|
29861
29956
|
import React211 from "react";
|
|
29862
29957
|
import {
|
|
29863
29958
|
ALL_FORMATS as ALL_FORMATS2,
|
|
@@ -29873,7 +29968,7 @@ import { jsx as jsx216 } from "react/jsx-runtime";
|
|
|
29873
29968
|
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
29874
29969
|
import { useMemo as useMemo63, useState as useState63 } from "react";
|
|
29875
29970
|
import {
|
|
29876
|
-
useContext as
|
|
29971
|
+
useContext as useContext46,
|
|
29877
29972
|
useEffect as useEffect210,
|
|
29878
29973
|
useLayoutEffect as useLayoutEffect34,
|
|
29879
29974
|
useMemo as useMemo412,
|
|
@@ -30295,6 +30390,12 @@ var audioIteratorManager = ({
|
|
|
30295
30390
|
let audioIteratorsCreated = 0;
|
|
30296
30391
|
let totalAudioScheduledInSeconds = 0;
|
|
30297
30392
|
let currentDelayHandle = null;
|
|
30393
|
+
const unblockCurrentDelayHandle = () => {
|
|
30394
|
+
if (currentDelayHandle) {
|
|
30395
|
+
currentDelayHandle.unblock();
|
|
30396
|
+
currentDelayHandle = null;
|
|
30397
|
+
}
|
|
30398
|
+
};
|
|
30298
30399
|
const pendingScheduleWaiters = [];
|
|
30299
30400
|
const notifyNodeScheduled = () => {
|
|
30300
30401
|
for (let i = pendingScheduleWaiters.length - 1;i >= 0; i--) {
|
|
@@ -30395,6 +30496,7 @@ var audioIteratorManager = ({
|
|
|
30395
30496
|
waitForTurn({
|
|
30396
30497
|
getPriority: () => {
|
|
30397
30498
|
if (iterator.isDestroyed()) {
|
|
30499
|
+
onDestroyed();
|
|
30398
30500
|
return null;
|
|
30399
30501
|
}
|
|
30400
30502
|
const guessedNextTimestamp = iterator.guessNextTimestamp();
|
|
@@ -30447,9 +30549,11 @@ var audioIteratorManager = ({
|
|
|
30447
30549
|
},
|
|
30448
30550
|
onError: (e) => {
|
|
30449
30551
|
if (e instanceof InputDisposedError) {
|
|
30552
|
+
onDestroyed();
|
|
30450
30553
|
return;
|
|
30451
30554
|
}
|
|
30452
30555
|
if (e instanceof StaleWaiterError) {
|
|
30556
|
+
onDestroyed();
|
|
30453
30557
|
return;
|
|
30454
30558
|
}
|
|
30455
30559
|
throw e;
|
|
@@ -30475,6 +30579,7 @@ var audioIteratorManager = ({
|
|
|
30475
30579
|
return;
|
|
30476
30580
|
}
|
|
30477
30581
|
audioBufferIterator?.destroy();
|
|
30582
|
+
unblockCurrentDelayHandle();
|
|
30478
30583
|
const delayHandle = delayPlaybackHandleIfNotPremounting();
|
|
30479
30584
|
currentDelayHandle = delayHandle;
|
|
30480
30585
|
const iterator = makeAudioIterator({
|
|
@@ -30489,6 +30594,7 @@ var audioIteratorManager = ({
|
|
|
30489
30594
|
});
|
|
30490
30595
|
audioIteratorsCreated++;
|
|
30491
30596
|
audioBufferIterator = iterator;
|
|
30597
|
+
let chunksScheduled = 0;
|
|
30492
30598
|
proceedScheduling({
|
|
30493
30599
|
iterator,
|
|
30494
30600
|
nonce,
|
|
@@ -30496,7 +30602,10 @@ var audioIteratorManager = ({
|
|
|
30496
30602
|
playbackRate,
|
|
30497
30603
|
scheduleAudioNode,
|
|
30498
30604
|
onScheduled: () => {
|
|
30499
|
-
|
|
30605
|
+
chunksScheduled++;
|
|
30606
|
+
if (chunksScheduled === 6) {
|
|
30607
|
+
delayHandle.unblock();
|
|
30608
|
+
}
|
|
30500
30609
|
},
|
|
30501
30610
|
onDestroyed: () => {
|
|
30502
30611
|
delayHandle.unblock();
|
|
@@ -30524,6 +30633,9 @@ var audioIteratorManager = ({
|
|
|
30524
30633
|
fps,
|
|
30525
30634
|
getAudioContextCurrentTimeMockedInTest
|
|
30526
30635
|
}) => {
|
|
30636
|
+
if (nonce.isStale()) {
|
|
30637
|
+
return;
|
|
30638
|
+
}
|
|
30527
30639
|
if (currentSeek.time === newTime && currentSeek.playbackRate === playbackRate && currentSeek.trimBefore === trimBefore && currentSeek.trimAfter === trimAfter && currentSeek.sequenceOffset === sequenceOffset && currentSeek.sequenceDurationInFrames === sequenceDurationInFrames && currentSeek.loop === loop && currentSeek.fps === fps) {
|
|
30528
30640
|
return;
|
|
30529
30641
|
}
|
|
@@ -30575,10 +30687,7 @@ var audioIteratorManager = ({
|
|
|
30575
30687
|
destroyIterator: () => {
|
|
30576
30688
|
audioBufferIterator?.destroy();
|
|
30577
30689
|
audioBufferIterator = null;
|
|
30578
|
-
|
|
30579
|
-
currentDelayHandle.unblock();
|
|
30580
|
-
currentDelayHandle = null;
|
|
30581
|
-
}
|
|
30690
|
+
unblockCurrentDelayHandle();
|
|
30582
30691
|
},
|
|
30583
30692
|
seek: seek2,
|
|
30584
30693
|
getAudioIteratorsCreated: () => audioIteratorsCreated,
|
|
@@ -31626,7 +31735,7 @@ var useCommonEffects = ({
|
|
|
31626
31735
|
logLevel,
|
|
31627
31736
|
label: label3
|
|
31628
31737
|
}) => {
|
|
31629
|
-
const sharedAudioContext =
|
|
31738
|
+
const sharedAudioContext = useContext47(Internals.SharedAudioContext);
|
|
31630
31739
|
useLayoutEffect18(() => {
|
|
31631
31740
|
const mediaPlayer = mediaPlayerRef.current;
|
|
31632
31741
|
if (!mediaPlayer)
|
|
@@ -33902,7 +34011,7 @@ var AudioForRendering2 = ({
|
|
|
33902
34011
|
const frame = useCurrentFrame();
|
|
33903
34012
|
const absoluteFrame = Internals.useTimelinePosition();
|
|
33904
34013
|
const videoConfig = Internals.useUnsafeVideoConfig();
|
|
33905
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
34014
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext310(Internals.RenderAssetManager);
|
|
33906
34015
|
const startsAt = Internals.useMediaStartsAt();
|
|
33907
34016
|
const environment = useRemotionEnvironment();
|
|
33908
34017
|
if (!videoConfig) {
|
|
@@ -33914,7 +34023,7 @@ var AudioForRendering2 = ({
|
|
|
33914
34023
|
const { fps } = videoConfig;
|
|
33915
34024
|
const { delayRender: delayRender2, continueRender } = useDelayRender();
|
|
33916
34025
|
const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState210(false);
|
|
33917
|
-
const sequenceContext =
|
|
34026
|
+
const sequenceContext = useContext310(Internals.SequenceContext);
|
|
33918
34027
|
const id = useMemo213(() => `media-audio-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
33919
34028
|
src,
|
|
33920
34029
|
sequenceContext?.cumulatedFrom,
|
|
@@ -34267,7 +34376,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
34267
34376
|
const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState43(false);
|
|
34268
34377
|
const [playing] = Timeline2.usePlayingState();
|
|
34269
34378
|
const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
|
|
34270
|
-
const sharedAudioContext =
|
|
34379
|
+
const sharedAudioContext = useContext46(SharedAudioContext22);
|
|
34271
34380
|
const buffer = useBufferState();
|
|
34272
34381
|
const [mediaMuted] = useMediaMutedState22();
|
|
34273
34382
|
const [mediaVolume] = useMediaVolumeState22();
|
|
@@ -34288,7 +34397,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
34288
34397
|
effectChainStateRef.current = effectChainState;
|
|
34289
34398
|
const frameRef = useRef210(frame);
|
|
34290
34399
|
frameRef.current = frame;
|
|
34291
|
-
const parentSequence =
|
|
34400
|
+
const parentSequence = useContext46(SequenceContext22);
|
|
34292
34401
|
const isPremounting = Boolean(parentSequence?.premounting);
|
|
34293
34402
|
const isPostmounting = Boolean(parentSequence?.postmounting);
|
|
34294
34403
|
const sequenceOffset = ((parentSequence?.cumulatedFrom ?? 0) + (parentSequence?.relativeFrom ?? 0)) / videoConfig.fps;
|
|
@@ -34296,7 +34405,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
34296
34405
|
const currentTimeRef = useRef210(currentTime);
|
|
34297
34406
|
currentTimeRef.current = currentTime;
|
|
34298
34407
|
const preloadedSrc = usePreload22(src);
|
|
34299
|
-
const buffering =
|
|
34408
|
+
const buffering = useContext46(Internals.BufferingContextReact);
|
|
34300
34409
|
if (!buffering) {
|
|
34301
34410
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
34302
34411
|
}
|
|
@@ -36438,7 +36547,7 @@ import {
|
|
|
36438
36547
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
36439
36548
|
|
|
36440
36549
|
// ../core/dist/esm/version.mjs
|
|
36441
|
-
var VERSION2 = "4.0.
|
|
36550
|
+
var VERSION2 = "4.0.460";
|
|
36442
36551
|
|
|
36443
36552
|
// ../web-renderer/dist/esm/index.mjs
|
|
36444
36553
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -43426,6 +43535,7 @@ var listOfRemotionPackages = [
|
|
|
43426
43535
|
"@remotion/studio",
|
|
43427
43536
|
"@remotion/tailwind",
|
|
43428
43537
|
"@remotion/tailwind-v4",
|
|
43538
|
+
"@remotion/timeline-utils",
|
|
43429
43539
|
"@remotion/test-utils",
|
|
43430
43540
|
"@remotion/three",
|
|
43431
43541
|
"@remotion/transitions",
|
|
@@ -44702,7 +44812,7 @@ var GithubButton = () => {
|
|
|
44702
44812
|
" ",
|
|
44703
44813
|
/* @__PURE__ */ jsx164("div", {
|
|
44704
44814
|
className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
|
|
44705
|
-
children: "
|
|
44815
|
+
children: "46k"
|
|
44706
44816
|
})
|
|
44707
44817
|
]
|
|
44708
44818
|
});
|