@remotion/promo-pages 4.0.430 → 4.0.432
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 +52617 -50097
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +52617 -50097
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts/experts-data.js +15 -0
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts.js +264 -74
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsGallery.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsShow.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsSubmit.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/team.js +15 -0
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +410 -219
- package/dist/design.js +410 -219
- package/dist/experts/experts-data.js +15 -0
- package/dist/experts.js +264 -74
- package/dist/homepage/Pricing.js +410 -219
- package/dist/prompts/PromptsGallery.js +410 -219
- package/dist/prompts/PromptsShow.js +410 -219
- package/dist/prompts/PromptsSubmit.js +410 -219
- package/dist/team.js +15 -0
- package/dist/template-modal-content.js +410 -219
- package/dist/templates.js +410 -219
- package/package.json +13 -13
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/Homepage.css +0 -32
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/Homepage.js +0 -63571
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/design.js +0 -20053
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/experts/experts-data.js +0 -689
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/experts.js +0 -8378
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/homepage/Pricing.js +0 -21502
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsGallery.js +0 -19934
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsShow.css +0 -2578
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsShow.js +0 -39755
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsSubmit.css +0 -2578
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsSubmit.js +0 -39846
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/prompt-types.js +0 -0
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/team.js +0 -292
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/template-modal-content.css +0 -32
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/template-modal-content.js +0 -21671
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/templates.js +0 -21014
- 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 -263
- 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 -134
- 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 -101
- package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
- package/dist/components/homepage/IfYouKnowReact.js +0 -23
- package/dist/components/homepage/InfoTooltip.d.ts +0 -6
- package/dist/components/homepage/InfoTooltip.js +0 -6
- 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/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/tts.d.ts +0 -3
- package/dist/components/icons/tts.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.d.ts +0 -3
- package/dist/components/team.js +0 -14
- 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
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Player } from '@remotion/player';
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
4
|
-
import { PALETTE } from '../layout/colors';
|
|
5
|
-
import { useColorMode } from '../layout/use-color-mode';
|
|
6
|
-
import { SectionTitle } from '../VideoAppsTitle';
|
|
7
|
-
import { getDataAndProps, HomepageVideoComp, } from './Comp';
|
|
8
|
-
import { DemoError } from './DemoError';
|
|
9
|
-
import { RenderButton } from './DemoRender';
|
|
10
|
-
import { DownloadNudge } from './DownloadNudge';
|
|
11
|
-
import { DragAndDropNudge } from './DragAndDropNudge';
|
|
12
|
-
import { PlayerControls } from './PlayerControls';
|
|
13
|
-
import { ThemeNudge } from './ThemeNudge';
|
|
14
|
-
const style = {
|
|
15
|
-
width: '100%',
|
|
16
|
-
aspectRatio: '640 / 360',
|
|
17
|
-
borderBottom: `2px solid ${PALETTE.BOX_STROKE}`,
|
|
18
|
-
touchAction: 'none', // prevent page from scrolling when dragging children on mobile
|
|
19
|
-
};
|
|
20
|
-
const playerWrapper = {
|
|
21
|
-
border: `2px solid ${PALETTE.BOX_STROKE}`,
|
|
22
|
-
borderBottom: `4px solid ${PALETTE.BOX_STROKE}`,
|
|
23
|
-
borderRadius: 8,
|
|
24
|
-
width: '100%',
|
|
25
|
-
overflow: 'hidden',
|
|
26
|
-
};
|
|
27
|
-
export const Demo = () => {
|
|
28
|
-
const { colorMode } = useColorMode();
|
|
29
|
-
const [data, setData] = useState(null);
|
|
30
|
-
const ref = useRef(null);
|
|
31
|
-
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
32
|
-
const [cardOrder, setCardOrder] = useState([0, 1, 2, 3]);
|
|
33
|
-
const [emojiIndex, setEmojiIndex] = useState(0);
|
|
34
|
-
const [error, setError] = useState(false);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
getDataAndProps()
|
|
37
|
-
.then((d) => {
|
|
38
|
-
setData(d);
|
|
39
|
-
})
|
|
40
|
-
.catch((err) => {
|
|
41
|
-
// eslint-disable-next-line no-console
|
|
42
|
-
console.log(err);
|
|
43
|
-
setError(true);
|
|
44
|
-
});
|
|
45
|
-
}, []);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
const { current: playerRef } = ref;
|
|
48
|
-
if (!playerRef || !data) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const onFullscreenChange = () => {
|
|
52
|
-
setIsFullscreen(playerRef.isFullscreen());
|
|
53
|
-
};
|
|
54
|
-
playerRef.addEventListener('fullscreenchange', onFullscreenChange);
|
|
55
|
-
return () => {
|
|
56
|
-
playerRef.removeEventListener('fullscreenchange', onFullscreenChange);
|
|
57
|
-
};
|
|
58
|
-
}, [data]);
|
|
59
|
-
const updateCardOrder = useCallback((newCardOrder) => {
|
|
60
|
-
setCardOrder(newCardOrder);
|
|
61
|
-
}, []);
|
|
62
|
-
const props = useMemo(() => {
|
|
63
|
-
var _a, _b;
|
|
64
|
-
return {
|
|
65
|
-
theme: colorMode,
|
|
66
|
-
onToggle: () => {
|
|
67
|
-
var _a;
|
|
68
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.toggle();
|
|
69
|
-
},
|
|
70
|
-
cardOrder,
|
|
71
|
-
updateCardOrder,
|
|
72
|
-
location: (_a = data === null || data === void 0 ? void 0 : data.location) !== null && _a !== void 0 ? _a : null,
|
|
73
|
-
trending: (_b = data === null || data === void 0 ? void 0 : data.trending) !== null && _b !== void 0 ? _b : null,
|
|
74
|
-
onClickLeft: () => {
|
|
75
|
-
setEmojiIndex((e) => e - 1);
|
|
76
|
-
},
|
|
77
|
-
onClickRight: () => {
|
|
78
|
-
setEmojiIndex((e) => e + 1);
|
|
79
|
-
},
|
|
80
|
-
emojiIndex,
|
|
81
|
-
};
|
|
82
|
-
}, [cardOrder, emojiIndex, colorMode, data, updateCardOrder]);
|
|
83
|
-
const onError = useCallback(() => {
|
|
84
|
-
setError(true);
|
|
85
|
-
}, []);
|
|
86
|
-
return (_jsxs("div", { children: [_jsx("br", {}), _jsx("br", {}), _jsx(SectionTitle, { children: "Demo" }), _jsxs("div", { style: { height: 140, position: 'relative' }, children: [_jsx(DragAndDropNudge, {}), _jsx(ThemeNudge, {})] }), _jsxs("div", { style: playerWrapper, children: [_jsx(Player, { ref: ref, component: HomepageVideoComp, compositionWidth: 640, compositionHeight: 360, durationInFrames: 120, fps: 30, autoPlay: true, controls: isFullscreen, clickToPlay: false, style: style, initiallyMuted: true, inputProps: props, acknowledgeRemotionLicense: true, numberOfSharedAudioTags: 0, loop: true }), _jsx(PlayerControls, { playerRef: ref, durationInFrames: 120, fps: 30, children: _jsx(RenderButton, { onError: onError, renderData: data
|
|
87
|
-
? {
|
|
88
|
-
cardOrder,
|
|
89
|
-
emojiIndex,
|
|
90
|
-
location: data.location,
|
|
91
|
-
theme: colorMode,
|
|
92
|
-
trending: data.trending,
|
|
93
|
-
}
|
|
94
|
-
: null, playerRef: ref }) })] }), error ? _jsx(DemoError, {}) : null, _jsx(DownloadNudge, {})] }));
|
|
95
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type Position = {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const paddingAndMargin = 20;
|
|
6
|
-
export declare const cardHeight: number;
|
|
7
|
-
export declare const cardWidth: number;
|
|
8
|
-
export declare const getPositionForIndex: (index: number) => Position;
|
|
9
|
-
export declare const getInitialPositions: () => Position[];
|
|
10
|
-
export declare const getIndexFromPosition: (clientX: number, clientY: number) => 0 | 3 | 1 | 2 | undefined;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export const paddingAndMargin = 20;
|
|
2
|
-
const height = 360;
|
|
3
|
-
const width = 640;
|
|
4
|
-
export const cardHeight = (height - paddingAndMargin * 3) / 2;
|
|
5
|
-
export const cardWidth = (width - paddingAndMargin * 3) / 2;
|
|
6
|
-
export const getPositionForIndex = (index) => {
|
|
7
|
-
const x = index % 2 === 0 ? paddingAndMargin : cardWidth + paddingAndMargin * 2;
|
|
8
|
-
const y = index < 2 ? paddingAndMargin : cardHeight + paddingAndMargin * 2;
|
|
9
|
-
return { x, y };
|
|
10
|
-
};
|
|
11
|
-
export const getInitialPositions = () => {
|
|
12
|
-
return new Array(4).fill(true).map((_, i) => getPositionForIndex(i));
|
|
13
|
-
};
|
|
14
|
-
export const getIndexFromPosition = (clientX, clientY) => {
|
|
15
|
-
const left = clientX < cardWidth / 2 + paddingAndMargin;
|
|
16
|
-
const top = clientY < cardHeight / 2 + paddingAndMargin;
|
|
17
|
-
if (left && top) {
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
if (!left && top) {
|
|
21
|
-
return 1;
|
|
22
|
-
}
|
|
23
|
-
if (left && !top) {
|
|
24
|
-
return 2;
|
|
25
|
-
}
|
|
26
|
-
if (!left && !top) {
|
|
27
|
-
return 3;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
File without changes
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BlueButton, ClearButton } from './layout/Button';
|
|
3
|
-
import { MuxVideo } from './MuxVideo';
|
|
4
|
-
import { SectionTitle } from './VideoAppsTitle';
|
|
5
|
-
const EditorStarterSection = () => {
|
|
6
|
-
return (_jsxs("div", { children: [_jsx(SectionTitle, { children: "Build your own video editor" }), _jsx("br", {}), _jsx("div", { className: 'card flex p-0 overflow-hidden', children: _jsxs("div", { className: 'flex-1 flex flex-col lg:flex-row justify-center', children: [_jsx("div", { className: 'w-full max-w-[500px] aspect-square relative overflow-hidden bg-[#eee]', children: _jsx(MuxVideo, { muxId: 'YIvIidbcAc7009B00Wr7gIbGyq67YGNlytGvMXwdsLRtc', className: 'absolute left-0 top-0 w-full h-full object-cover object-top rounded-sm rounded-tr-none rounded-br-none', loop: true, autoPlay: true, playsInline: true, muted: true }) }), _jsxs("div", { className: 'p-6 flex-1 flex flex-col h-full', children: [_jsx("div", { className: "text-4xl font-bold fontbrand mt-0", children: "Editor Starter" }), _jsx("div", { className: "text-muted mt-4 text-base fontbrand", children: "A comprehensive template that includes everything you need to create custom video editing applications with React and TypeScript." }), _jsx("div", { className: "h-5" }), _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx("a", { href: "https://www.remotion.pro/editor-starter?ref=remotion.dev", target: "_blank", className: "no-underline", children: _jsx(BlueButton, { size: "sm", loading: false, children: "Purchase" }) }), _jsx("a", { href: "https://editor-starter.remotion.dev?ref=remotion.dev", target: "_blank", className: "no-underline", children: _jsx(ClearButton, { size: "sm", loading: false, children: "Demo" }) }), ' ', _jsx("a", { href: "https://remotion.dev/editor-starter", className: "no-underline", children: _jsx(ClearButton, { size: "sm", loading: false, children: "Docs" }) })] }), _jsx("br", {})] })] }) })] }));
|
|
7
|
-
};
|
|
8
|
-
export default EditorStarterSection;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// Adjustments to the EvaluateRemotionSection.tsx to separate the flex box into two boxes
|
|
3
|
-
// with specified alignment and positioning requirements.
|
|
4
|
-
import { useEffect, useState } from 'react';
|
|
5
|
-
import { experts } from '../experts';
|
|
6
|
-
import { BlueButton } from './layout/Button';
|
|
7
|
-
const EvaluateRemotionSection = () => {
|
|
8
|
-
const [dailyAvatars, setDailyAvatars] = useState([]);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const avatars = experts.map((expert) => expert.image);
|
|
11
|
-
const selectedAvatars = [];
|
|
12
|
-
for (let i = 0; i < 3; i++) {
|
|
13
|
-
const index = Math.floor(Math.random() * avatars.length);
|
|
14
|
-
selectedAvatars.push(avatars[index]);
|
|
15
|
-
avatars.splice(index, 1); // Remove selected avatar to avoid duplicates
|
|
16
|
-
}
|
|
17
|
-
setDailyAvatars(selectedAvatars);
|
|
18
|
-
}, []);
|
|
19
|
-
return (_jsxs("div", { className: "flex flex-col lg:flex-row gap-2", children: [_jsxs("div", { className: 'card flex-1 flex flex-col', children: [_jsx("div", { className: 'fontbrand text-2xl font-bold', children: "Questions about our license?" }), _jsx("p", { className: 'text-muted fontbrand leading-snug', children: "Book a 20 minute call or write us an email to get all your questions answered." }), _jsx("div", { className: "flex-1" }), _jsxs("div", { className: "flex flex-row flex-wrap gap-2", children: [_jsx("a", { target: "_blank", href: "https://cal.com/remotion/evaluate", style: { textDecoration: 'none' }, children: _jsx(BlueButton, { size: "sm", loading: false, children: "Schedule a call" }) }), _jsx("a", { target: "_blank", href: "mailto:hi@remotion.dev", style: { textDecoration: 'none' }, children: _jsx(BlueButton, { size: "sm", loading: false, children: "Write an email" }) })] })] }), _jsxs("div", { className: 'card flex-1 flex flex-col', children: [_jsx("div", { className: 'fontbrand text-2xl font-bold', children: "Get help with your Remotion project" }), _jsx("p", { className: 'text-muted fontbrand leading-snug', children: "Contact our experts for help and work." }), _jsx("div", { className: "flex-1" }), _jsxs("div", { className: 'flex flex-row justify-between', children: [_jsx("a", { href: "/experts", style: { textDecoration: 'none' }, children: _jsx(BlueButton, { size: "sm", loading: false, children: "Remotion Experts" }) }), _jsx("div", { className: 'flex justify-end items-end gap-3', children: dailyAvatars.map((avatar) => (_jsx("div", { className: 'w-12 h-12 rounded-full bg-muted bg-cover bg-center -ml-5 border-2 border-black', style: { backgroundImage: `url(${avatar})` } }, avatar))) })] })] })] }));
|
|
20
|
-
};
|
|
21
|
-
export default EvaluateRemotionSection;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Switch } from '@remotion/design';
|
|
3
|
-
import React, { useCallback, useMemo } from 'react';
|
|
4
|
-
import { cn } from '../../cn';
|
|
5
|
-
import { InfoTooltip } from './InfoTooltip';
|
|
6
|
-
import { PricingBulletPoint } from './PricingBulletPoint';
|
|
7
|
-
const Container = ({ children, }) => {
|
|
8
|
-
return (_jsx("div", { className: 'flex flex-col border-effect rounded-xl p-5 bg-pane', children: children }));
|
|
9
|
-
};
|
|
10
|
-
const Title = ({ children }) => {
|
|
11
|
-
return (_jsx("div", { className: "text-4xl font-bold leading-none fontbrand mt-2 mb-5", children: children }));
|
|
12
|
-
};
|
|
13
|
-
const Audience = ({ children }) => {
|
|
14
|
-
return _jsx("div", { className: 'fontbrand text-lg leading-none', children: children });
|
|
15
|
-
};
|
|
16
|
-
const BottomInfo = ({ children, className, ...props }) => {
|
|
17
|
-
return (_jsx("div", { className: cn(className, 'text-[var(--subtitle)] fontbrand text-sm'), ...props, children: children }));
|
|
18
|
-
};
|
|
19
|
-
const PriceTag = ({ children }) => {
|
|
20
|
-
return (_jsx("div", { className: 'fontbrand text-2xl font-bold min-w-[80px] w-auto text-right shrink-0 ml-4', children: children }));
|
|
21
|
-
};
|
|
22
|
-
const icon = {
|
|
23
|
-
height: 16,
|
|
24
|
-
marginLeft: 4,
|
|
25
|
-
};
|
|
26
|
-
const PricingSlider = ({ value, onChange, min, max, step = 1 }) => {
|
|
27
|
-
const percentage = ((value - min) / (max - min)) * 100;
|
|
28
|
-
return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
|
|
29
|
-
.pricing-slider {
|
|
30
|
-
-webkit-appearance: none;
|
|
31
|
-
appearance: none;
|
|
32
|
-
height: 12px;
|
|
33
|
-
border-radius: 8px;
|
|
34
|
-
border: 2px solid black;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
}
|
|
37
|
-
.pricing-slider::-webkit-slider-thumb {
|
|
38
|
-
-webkit-appearance: none;
|
|
39
|
-
appearance: none;
|
|
40
|
-
width: 24px;
|
|
41
|
-
height: 24px;
|
|
42
|
-
border-radius: 50%;
|
|
43
|
-
background: white;
|
|
44
|
-
border: 2px solid black;
|
|
45
|
-
border-bottom-width: 4px;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
scale: 1.2;
|
|
48
|
-
}
|
|
49
|
-
.pricing-slider::-moz-range-thumb {
|
|
50
|
-
width: 24px;
|
|
51
|
-
height: 24px;
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
background: white;
|
|
54
|
-
border: 2px solid black;
|
|
55
|
-
border-bottom-width: 4px;
|
|
56
|
-
scale: 1.2;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
}
|
|
59
|
-
` }), _jsx("input", { type: "range", min: min, max: max, step: step, value: value, onChange: (e) => onChange(Number(e.target.value)), className: "pricing-slider w-full", style: {
|
|
60
|
-
background: `linear-gradient(to right, var(--color-brand) 0%, var(--color-brand) ${percentage}%, var(--background) ${percentage}%, var(--background) 100%)`,
|
|
61
|
-
} })] }));
|
|
62
|
-
};
|
|
63
|
-
const textUnitWrapper = {
|
|
64
|
-
display: 'flex',
|
|
65
|
-
flexDirection: 'column',
|
|
66
|
-
};
|
|
67
|
-
export const FreePricing = () => {
|
|
68
|
-
return (_jsxs(Container, { children: [_jsx(Audience, { children: "For individuals and companies of up to 3 people" }), _jsx(Title, { children: "Free License" }), _jsx(PricingBulletPoint, { text: "Create and automate", checked: true }), _jsx(PricingBulletPoint, { text: "Commercial use allowed", checked: true }), _jsx(PricingBulletPoint, { text: "Unlimited use", checked: true }), _jsx(PricingBulletPoint, { text: "Must upgrade when your team grows", checked: false }), _jsx("div", { className: 'flex flex-row justify-end mt-4', children: _jsx("div", { style: {
|
|
69
|
-
...textUnitWrapper,
|
|
70
|
-
alignItems: 'flex-end',
|
|
71
|
-
}, children: _jsxs("a", { target: "_blank", href: "https://www.remotion.dev/docs", className: "font-brand text-brand flex flex-row items-center gap-1 no-underline", children: ["No sign up needed - get started", ' ', _jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: _jsx("path", { fill: "currentColor", d: "M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z" }) })] }) }) })] }));
|
|
72
|
-
};
|
|
73
|
-
export const EnterpriseLicense = () => {
|
|
74
|
-
return (_jsxs(Container, { children: [_jsx(Audience, { children: "For advanced needs" }), _jsx(Title, { children: "Enterprise License" }), _jsx(PricingBulletPoint, { text: "Everything in Company License", checked: true }), _jsx(PricingBulletPoint, { text: "Private Slack or Discord", checked: true }), _jsx(PricingBulletPoint, { text: "Monthly consulting session", checked: true }), _jsx(PricingBulletPoint, { text: "Custom terms, billing and pricing", checked: true }), _jsx(PricingBulletPoint, { text: "Compliance forms", checked: true }), _jsx(PricingBulletPoint, { text: "Prioritized feature requests", checked: true }), _jsx(PricingBulletPoint, { text: _jsxs("span", { children: [_jsx("a", { href: "https://www.remotion.dev/editor-starter", className: "underline underline-offset-4 text-inherit", children: "Editor Starter" }), ' ', "included"] }), checked: true }), _jsx("div", { style: { height: 30 } }), _jsx("div", { className: 'flex flex-row justify-end', children: _jsxs("div", { style: {
|
|
75
|
-
...textUnitWrapper,
|
|
76
|
-
alignItems: 'flex-end',
|
|
77
|
-
}, children: [_jsx(PriceTag, { children: _jsx("a", { className: 'cursor-pointer no-underline text-inherit hover:text-brand', target: '_blank', href: "https://www.remotion.pro/contact", children: "Contact us" }) }), _jsx("div", { className: 'text-[var(--subtitle)] fontbrand text-sm', children: "Starting at $500 per month" })] }) })] }));
|
|
78
|
-
};
|
|
79
|
-
const SEAT_PRICE = 25;
|
|
80
|
-
const RENDER_UNIT_PRICE = 10;
|
|
81
|
-
const SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
|
|
82
|
-
return (_jsxs("div", { className: "flex flex-row gap-3 cursor-pointer select-none items-center", children: [_jsx(Switch, { active: checked, onToggle: () => onChange(!checked) }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "fontbrand font-bold text-lg flex flex-row items-center gap-1", children: [title, children] }), _jsx("div", { className: "text-muted fontbrand text-sm", children: subtitle })] }), _jsx("div", { className: "flex-1" }), _jsx("div", { className: cn('fontbrand text-muted transition-opacity duration-150', checked ? 'hidden' : 'opacity-100'), children: "Not selected" })] }));
|
|
83
|
-
};
|
|
84
|
-
export const CompanyPricing = () => {
|
|
85
|
-
const [creatorsSelected, setCreatorsSelected] = React.useState(false);
|
|
86
|
-
const [automatorsSelected, setAutomatorsSelected] = React.useState(true);
|
|
87
|
-
const [devSeatCount, setDevSeatCount] = React.useState(3);
|
|
88
|
-
const [cloudRenders, setCloudRenders] = React.useState(10000);
|
|
89
|
-
const formatPrice = useCallback((price) => {
|
|
90
|
-
const formatter = new Intl.NumberFormat('en-US', {
|
|
91
|
-
style: 'currency',
|
|
92
|
-
currency: 'USD',
|
|
93
|
-
maximumFractionDigits: 0,
|
|
94
|
-
});
|
|
95
|
-
return formatter.format(price);
|
|
96
|
-
}, []);
|
|
97
|
-
const creatorsPrice = creatorsSelected ? devSeatCount * SEAT_PRICE : 0;
|
|
98
|
-
const automatorsPrice = automatorsSelected
|
|
99
|
-
? Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE
|
|
100
|
-
: 0;
|
|
101
|
-
const totalPrice = useMemo(() => {
|
|
102
|
-
const basePrice = creatorsPrice + automatorsPrice;
|
|
103
|
-
// Minimum only applies if automation is selected
|
|
104
|
-
if (automatorsSelected) {
|
|
105
|
-
return Math.max(100, basePrice);
|
|
106
|
-
}
|
|
107
|
-
return basePrice;
|
|
108
|
-
}, [creatorsPrice, automatorsPrice, automatorsSelected]);
|
|
109
|
-
const totalPriceString = useMemo(() => {
|
|
110
|
-
return formatPrice(totalPrice);
|
|
111
|
-
}, [formatPrice, totalPrice]);
|
|
112
|
-
const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
|
|
113
|
-
const showEnterpriseMessage = totalPrice >= 500;
|
|
114
|
-
return (_jsxs(Container, { children: [_jsx(Audience, { children: "For collaborations and companies of 4+ people" }), _jsx(Title, { children: "Company License" }), _jsx(PricingBulletPoint, { text: "Create and automate", checked: true }), _jsx(PricingBulletPoint, { text: "Commercial use allowed", checked: true }), _jsx(PricingBulletPoint, { text: "Pay according to usage", checked: true }), _jsx(PricingBulletPoint, { text: "Prioritized Support", checked: true }), _jsx(PricingBulletPoint, { text: "$250 Mux credits", checked: true, children: _jsxs(InfoTooltip, { children: ["Credits for Mux.com.", _jsx("br", {}), " Applies only to new Mux customers."] }) }), _jsx("div", { style: { height: 30 } }), _jsx(SectionCheckbox, { checked: creatorsSelected, onChange: setCreatorsSelected, title: "Remotion for Creators", subtitle: "Create videos for yourself - $25/mo per seat", children: _jsxs(InfoTooltip, { children: ["Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment.", _jsx("br", {}), _jsx("br", {}), "Get 1 Seat per user."] }) }), _jsx("div", { className: cn('grid ease-out', creatorsSelected
|
|
115
|
-
? 'grid-rows-[1fr] opacity-100'
|
|
116
|
-
: 'grid-rows-[0fr] opacity-0'), style: {
|
|
117
|
-
transition: creatorsSelected
|
|
118
|
-
? 'grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms'
|
|
119
|
-
: 'opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms',
|
|
120
|
-
}, children: _jsx("div", { className: "overflow-hidden", children: _jsxs("div", { className: "flex flex-row items-center gap-3 sm:gap-4 w-full py-3", children: [_jsx("div", { className: "flex-1 min-w-0", children: _jsx(PricingSlider, { value: devSeatCount, onChange: setDevSeatCount, min: 1, max: 50 }) }), _jsxs("div", { className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center", children: [devSeatCount, " ", devSeatCount === 1 ? 'Seat' : 'Seats'] }), _jsxs("div", { className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap", children: ["$", new Intl.NumberFormat('en-US', {
|
|
121
|
-
maximumFractionDigits: 0,
|
|
122
|
-
}).format(SEAT_PRICE * devSeatCount)] })] }) }) }), _jsx("div", { className: "h-6" }), _jsx(SectionCheckbox, { checked: automatorsSelected, onChange: setAutomatorsSelected, title: "Remotion for Automators", subtitle: "Build video creation tools - $0.01 per render, $100/mo minimum", children: _jsxs(InfoTooltip, { children: ["Intended for companies launching ", _jsx("br", {}), "SaaS applications; such as video editors and prompt-to-video apps, and automated high-volume video creation.", _jsx("br", {}), _jsx("br", {}), "A $100/mo Minimum Spend applies.", _jsx("br", {}), _jsx("br", {}), "Developers working on automation projects do not require a Seat."] }) }), _jsx("div", { className: cn('grid ease-out', automatorsSelected
|
|
123
|
-
? 'grid-rows-[1fr] opacity-100'
|
|
124
|
-
: 'grid-rows-[0fr] opacity-0'), style: {
|
|
125
|
-
transition: automatorsSelected
|
|
126
|
-
? 'grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms'
|
|
127
|
-
: 'opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms',
|
|
128
|
-
}, children: _jsx("div", { className: "overflow-hidden", children: _jsxs("div", { className: "flex flex-row items-center gap-3 sm:gap-4 w-full py-3", children: [_jsx("div", { className: "flex-1 min-w-0", children: _jsx(PricingSlider, { value: cloudRenders, onChange: setCloudRenders, min: 1000, max: 100000, step: 1000 }) }), _jsxs("div", { className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right", children: [new Intl.NumberFormat('en-US').format(cloudRenders), " Renders"] }), _jsxs("div", { className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap", children: ["$", new Intl.NumberFormat('en-US', {
|
|
129
|
-
maximumFractionDigits: 0,
|
|
130
|
-
}).format(Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE)] })] }) }) }), _jsx("div", { style: { height: 14 } }), _jsx("div", { className: 'flex flex-row justify-end', children: _jsxs("div", { style: { ...textUnitWrapper, alignItems: 'flex-end' }, children: [_jsxs(PriceTag, { children: [totalPriceString, "/month"] }), _jsx(BottomInfo, { "data-visible": showMinimumMessage, className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity", children: "The minimum is $100 per month for Remotion for Automators" }), _jsxs(BottomInfo, { "data-visible": showEnterpriseMessage, className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity", children: ["At this spend, you are eligible for the Enterprise License.", _jsx("br", {}), " You can select it when setting up your license, or", ' ', _jsx("a", { className: "bluelink", target: "_blank", href: "https://www.remotion.pro/contact", children: "contact us" }), "."] })] }) }), _jsx("div", { className: 'flex flex-row justify-end mt-4', children: _jsx("div", { style: {
|
|
131
|
-
...textUnitWrapper,
|
|
132
|
-
alignItems: 'flex-end',
|
|
133
|
-
}, children: _jsxs("a", { href: "https://remotion.pro/dashboard", className: "font-brand text-brand flex flex-row items-center gap-1 no-underline", children: ["Buy now", ' ', _jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: _jsx("path", { fill: "currentColor", d: "M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z" }) })] }) }) })] }));
|
|
134
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '@remotion/design';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { GithubButton } from './GitHubButton';
|
|
5
|
-
export const GetStarted = () => {
|
|
6
|
-
const [clicked, setClicked] = useState(null);
|
|
7
|
-
return (_jsxs("div", { className: "flex flex-col lg:flex-row items-center justify-center text-center w-full", children: [_jsx("div", { className: "w-full lg:w-auto", children: _jsxs("div", { className: "flex flex-row w-full relative", children: [clicked ? (_jsx("div", { style: {
|
|
8
|
-
animation: 'click 0.7s linear',
|
|
9
|
-
animationFillMode: 'forwards',
|
|
10
|
-
}, className: "absolute z-0 top-[-10px] font-mono text-sm text-center w-full", children: "Copied!" }, clicked)) : null, _jsx(Button, { className: "bg-[#333] text-white rounded-lg px-4 font-mono hover:[#444] cursor-pointer w-full", onClick: () => {
|
|
11
|
-
navigator.clipboard.writeText('npx create-video@latest');
|
|
12
|
-
setClicked(Date.now());
|
|
13
|
-
}, title: "Click to copy", children: "$ npx create-video@latest" })] }) }), _jsx("div", { style: { width: 10, height: 10 } }), _jsx("div", { className: "w-full lg:w-auto", children: _jsx(Button, { href: "/docs", className: "w-full", children: "Docs" }) }), _jsx("div", { className: "w-2 h-2" }), _jsx("div", { className: "w-full lg:w-auto", children: _jsx(Button, { href: "https://remotion.dev/discord", target: "_blank", className: "w-full", children: "Discord" }) }), _jsx("div", { className: "w-2 h-2" }), _jsx("div", { className: "w-full lg:w-auto", children: _jsx(Button, { href: "https://github.com/remotion-dev/remotion", target: "_blank", className: "w-full", children: _jsx(GithubButton, {}) }) }), ' ', _jsx("div", { className: "w-2 h-2" }), _jsx("div", { className: "w-full lg:w-auto", children: _jsxs(Button, { href: "/prompts", className: "w-full", children: [_jsx("svg", { width: "20", height: "20", viewBox: "0 0 149 149", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { marginRight: 8 }, children: _jsx("path", { d: "M29.05 98.54L58.19 82.19L58.68 80.77L58.19 79.98H56.77L51.9 79.68L35.25 79.23L20.81 78.63L6.82 77.88L3.3 77.13L0 72.78L0.340004 70.61L3.3 68.62L7.54 68.99L16.91 69.63L30.97 70.6L41.17 71.2L56.28 72.77H58.68L59.02 71.8L58.2 71.2L57.56 70.6L43.01 60.74L27.26 50.32L19.01 44.32L14.55 41.28L12.3 38.43L11.33 32.21L15.38 27.75L20.82 28.12L22.21 28.49L27.72 32.73L39.49 41.84L54.86 53.16L57.11 55.03L58.01 54.39L58.12 53.94L57.11 52.25L48.75 37.14L39.83 21.77L35.86 15.4L34.81 11.58C34.44 10.01 34.17 8.69 34.17 7.08L38.78 0.820007L41.33 0L47.48 0.820007L50.07 3.07001L53.89 11.81L60.08 25.57L69.68 44.28L72.49 49.83L73.99 54.97L74.55 56.54H75.52V55.64L76.31 45.1L77.77 32.16L79.19 15.51L79.68 10.82L82 5.2L86.61 2.16L90.21 3.88L93.17 8.12L92.76 10.86L91 22.3L87.55 40.22L85.3 52.22H86.61L88.11 50.72L94.18 42.66L104.38 29.91L108.88 24.85L114.13 19.26L117.5 16.6H123.87L128.56 23.57L126.46 30.77L119.9 39.09L114.46 46.14L106.66 56.64L101.79 65.04L102.24 65.71L103.4 65.6L121.02 61.85L130.54 60.13L141.9 58.18L147.04 60.58L147.6 63.02L145.58 68.01L133.43 71.01L119.18 73.86L97.96 78.88L97.7 79.07L98 79.44L107.56 80.34L111.65 80.56H121.66L140.3 81.95L145.17 85.17L148.09 89.11L147.6 92.11L140.1 95.93L129.98 93.53L106.36 87.91L98.26 85.89H97.14V86.56L103.89 93.16L116.26 104.33L131.75 118.73L132.54 122.29L130.55 125.1L128.45 124.8L114.84 114.56L109.59 109.95L97.7 99.94H96.91V100.99L99.65 105L114.12 126.75L114.87 133.42L113.82 135.59L110.07 136.9L105.95 136.15L97.48 124.26L88.74 110.87L81.69 98.87L80.83 99.36L76.67 144.17L74.72 146.46L70.22 148.18L66.47 145.33L64.48 140.72L66.47 131.61L68.87 119.72L70.82 110.27L72.58 98.53L73.63 94.63L73.56 94.37L72.7 94.48L63.85 106.63L50.39 124.82L39.74 136.22L37.19 137.23L32.77 134.94L33.18 130.85L35.65 127.21L50.39 108.46L59.28 96.84L65.02 90.13L64.98 89.16H64.64L25.49 114.58L18.52 115.48L15.52 112.67L15.89 108.06L17.31 106.56L29.08 98.46L29.04 98.5L29.05 98.54Z", fill: "#D97757" }) }), "Prompt a video"] }) })] }));
|
|
14
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
const GithubIcon = () => {
|
|
3
|
-
return (_jsx("svg", { viewBox: "0 0 496 512", style: { height: 24, marginRight: 8 }, children: _jsx("path", { fill: "currentColor", d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" }) }));
|
|
4
|
-
};
|
|
5
|
-
export const GithubButton = () => {
|
|
6
|
-
return (_jsxs("div", { className: "flex flex-row items-center text-base", children: [_jsx(GithubIcon, {}), " ", _jsx("span", { children: "GitHub" }), ' ', _jsx("div", { className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center", children: '37k' })] }));
|
|
7
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Blank } from '../icons/blank';
|
|
3
|
-
import { BrainIcon } from '../icons/brain';
|
|
4
|
-
import { CodeHike } from '../icons/code-hike';
|
|
5
|
-
import { Cubes } from '../icons/cubes';
|
|
6
|
-
import { JSIcon } from '../icons/js';
|
|
7
|
-
import { MusicIcon } from '../icons/music';
|
|
8
|
-
import { NextIcon } from '../icons/next';
|
|
9
|
-
import { OverlayIcon } from '../icons/overlay';
|
|
10
|
-
import { PromptToVideoIcon } from '../icons/prompt-to-video';
|
|
11
|
-
import { Recorder } from '../icons/recorder';
|
|
12
|
-
import { ReactRouterIcon } from '../icons/remix';
|
|
13
|
-
import { RenderServerIcon } from '../icons/render-server';
|
|
14
|
-
import { SkiaIcon } from '../icons/skia';
|
|
15
|
-
import { Stargazer } from '../icons/stargazer';
|
|
16
|
-
import { StillIcon } from '../icons/still';
|
|
17
|
-
import { TikTok } from '../icons/tiktok';
|
|
18
|
-
import { TypeScriptIcon } from '../icons/ts';
|
|
19
|
-
import { VercelIcon } from '../icons/vercel';
|
|
20
|
-
import { Waveform } from '../icons/waveform';
|
|
21
|
-
export const IconForTemplate = ({ template, scale = 1 }) => {
|
|
22
|
-
if (template.cliId === 'hello-world') {
|
|
23
|
-
return (_jsx(TypeScriptIcon, { style: {
|
|
24
|
-
height: scale * 48,
|
|
25
|
-
} }));
|
|
26
|
-
}
|
|
27
|
-
if (template.cliId === 'blank') {
|
|
28
|
-
return (_jsx(Blank, { style: {
|
|
29
|
-
height: scale * 36,
|
|
30
|
-
overflow: 'visible',
|
|
31
|
-
} }));
|
|
32
|
-
}
|
|
33
|
-
if (template.cliId === 'javascript') {
|
|
34
|
-
return (_jsx(JSIcon, { style: {
|
|
35
|
-
height: scale * 40,
|
|
36
|
-
} }));
|
|
37
|
-
}
|
|
38
|
-
if (template.cliId === 'three') {
|
|
39
|
-
return (_jsx(Cubes, { style: {
|
|
40
|
-
height: scale * 36,
|
|
41
|
-
} }));
|
|
42
|
-
}
|
|
43
|
-
if (template.cliId === 'still') {
|
|
44
|
-
return (_jsx(StillIcon, { style: {
|
|
45
|
-
height: scale * 36,
|
|
46
|
-
} }));
|
|
47
|
-
}
|
|
48
|
-
if (template.cliId === 'audiogram') {
|
|
49
|
-
return (_jsx(Waveform, { style: {
|
|
50
|
-
height: scale * 36,
|
|
51
|
-
} }));
|
|
52
|
-
}
|
|
53
|
-
if (template.cliId === 'skia') {
|
|
54
|
-
return (_jsx(SkiaIcon, { style: {
|
|
55
|
-
height: scale * 32,
|
|
56
|
-
} }));
|
|
57
|
-
}
|
|
58
|
-
if (template.cliId === 'music-visualization') {
|
|
59
|
-
return (_jsx(MusicIcon, { style: {
|
|
60
|
-
height: scale * 32,
|
|
61
|
-
} }));
|
|
62
|
-
}
|
|
63
|
-
if (template.cliId === 'react-router') {
|
|
64
|
-
return (_jsx(ReactRouterIcon, { style: {
|
|
65
|
-
height: scale * 32,
|
|
66
|
-
} }));
|
|
67
|
-
}
|
|
68
|
-
if (template.cliId === 'overlay') {
|
|
69
|
-
return _jsx(OverlayIcon, { style: { height: scale * 42 } });
|
|
70
|
-
}
|
|
71
|
-
if (template.cliId === 'render-server') {
|
|
72
|
-
return _jsx(RenderServerIcon, { style: { height: scale * 36 } });
|
|
73
|
-
}
|
|
74
|
-
if (template.cliId === 'recorder') {
|
|
75
|
-
return _jsx(Recorder, { style: { height: scale * 36 } });
|
|
76
|
-
}
|
|
77
|
-
if (template.cliId === 'next' ||
|
|
78
|
-
template.cliId === 'next-no-tailwind' ||
|
|
79
|
-
template.cliId === 'next-pages-dir') {
|
|
80
|
-
return _jsx(NextIcon, { style: { height: scale * 36 } });
|
|
81
|
-
}
|
|
82
|
-
if (template.cliId === 'stargazer') {
|
|
83
|
-
return _jsx(Stargazer, { style: { height: scale * 36 } });
|
|
84
|
-
}
|
|
85
|
-
if (template.cliId === 'tiktok') {
|
|
86
|
-
return _jsx(TikTok, { style: { height: scale * 36 } });
|
|
87
|
-
}
|
|
88
|
-
if (template.cliId === 'code-hike') {
|
|
89
|
-
return _jsx(CodeHike, { style: { height: scale * 36 } });
|
|
90
|
-
}
|
|
91
|
-
if (template.cliId === 'prompt-to-video') {
|
|
92
|
-
return _jsx(PromptToVideoIcon, { style: { height: scale * 36 } });
|
|
93
|
-
}
|
|
94
|
-
if (template.cliId === 'prompt-to-motion-graphics') {
|
|
95
|
-
return _jsx(BrainIcon, { style: { height: scale * 36 } });
|
|
96
|
-
}
|
|
97
|
-
if (template.cliId === 'vercel') {
|
|
98
|
-
return _jsx(VercelIcon, { style: { height: scale * 28 } });
|
|
99
|
-
}
|
|
100
|
-
throw new Error(`Unknown template: ${template.cliId}`);
|
|
101
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
export const isWebkit = () => {
|
|
4
|
-
if (typeof window === 'undefined') {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
const isSafariUserAgent = Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
|
|
8
|
-
const isChrome = Boolean(navigator.userAgent.match(/CriOS\//));
|
|
9
|
-
return isSafariUserAgent || isChrome;
|
|
10
|
-
};
|
|
11
|
-
const icon = {
|
|
12
|
-
height: 16,
|
|
13
|
-
marginLeft: 10,
|
|
14
|
-
};
|
|
15
|
-
export const IfYouKnowReact = () => {
|
|
16
|
-
const [vid, setVid] = useState('/img/compose.webm');
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (isWebkit()) {
|
|
19
|
-
setVid('/img/compose.mp4');
|
|
20
|
-
}
|
|
21
|
-
}, []);
|
|
22
|
-
return (_jsxs("div", { className: "flex flex-col lg:flex-row text-left justify-start lg:justify-end items-start lg:mb-0 gap-6 mt-8", children: [_jsx("video", { src: vid, muted: true, autoPlay: true, playsInline: true, loop: true, className: "w-[500px] h-[500px] cursor-default! relative lg:-translate-x-8 -mb-40 lg:mt-0 lg:mb-0" }), _jsxs("div", { children: [_jsxs("h2", { className: "text-4xl fontbrand pt-20", children: [_jsx("span", { className: "text-brand", children: "Compose" }), " with code"] }), _jsx("p", { className: "leading-relaxed font-brand", children: "Use React, a powerful frontend technology, to create sophisticated videos with code." }), _jsx("div", { className: "h-4" }), _jsxs("a", { className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center", href: "/docs/the-fundamentals", children: ["Learn Remotion", ' ', _jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: _jsx("path", { fill: "currentColor", d: "M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z" }) })] })] })] }));
|
|
23
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
export const InfoTooltip = ({ children }) => {
|
|
4
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
5
|
-
return (_jsxs("span", { className: "relative inline-block ml-1 text-gray-600 cursor-default", onPointerEnter: () => setIsVisible(true), onMouseLeave: () => setIsVisible(false), children: [_jsx("span", { className: "font-bold", style: { fontSize: '1rem' }, children: "\u24D8" }), isVisible && (_jsxs("span", { className: "absolute bottom-full left-1/2 transform -translate-x-1/2 bg-gray-500 text-white p-2 rounded text-sm z-10 cursor-default font-normal w-[300px] inline-block text-wrap", children: [children, _jsx("span", { className: "absolute top-full left-1/2 transform -translate-x-1/2 border-5 border-solid border-gray-500 border-t-transparent border-r-transparent border-b-transparent border-l-transparent cursor-default" })] }))] }));
|
|
6
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '@remotion/design';
|
|
3
|
-
import { useMobileLayout } from './layout/use-mobile-layout';
|
|
4
|
-
const icon = {
|
|
5
|
-
height: 16,
|
|
6
|
-
marginLeft: 10,
|
|
7
|
-
};
|
|
8
|
-
export const MoreTemplatesButton = () => {
|
|
9
|
-
const mobileLayout = useMobileLayout();
|
|
10
|
-
return (_jsxs(Button, { href: "/templates", className: "right-0 border-2 rounded-full text-inherit px-4 py-2 fontbrand font-semibold text-sm flex flex-row items-center h-10", children: [mobileLayout ? 'Templates' : 'Find a template', _jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: _jsx("path", { fill: "currentColor", d: "M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z" }) })] }));
|
|
11
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const MuxVideo: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLVideoElement> & React.VideoHTMLAttributes<HTMLVideoElement> & {
|
|
3
|
-
readonly muxId: string;
|
|
4
|
-
}, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
5
|
-
export declare const NewMuxVideo: React.FC<{
|
|
6
|
-
readonly muxId: string;
|
|
7
|
-
}>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Hls from 'hls.js';
|
|
3
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';
|
|
4
|
-
import { VideoPlayerWithControls } from './VideoPlayerWithControls';
|
|
5
|
-
const getVideoToPlayUrl = (muxId) => {
|
|
6
|
-
return `https://stream.mux.com/${muxId}.m3u8`;
|
|
7
|
-
};
|
|
8
|
-
const MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
9
|
-
const videoRef = useRef(null);
|
|
10
|
-
const vidUrl = getVideoToPlayUrl(muxId);
|
|
11
|
-
useImperativeHandle(ref, () => videoRef.current, []);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
let hls;
|
|
14
|
-
if (videoRef.current) {
|
|
15
|
-
const { current } = videoRef;
|
|
16
|
-
if (current.canPlayType('application/vnd.apple.mpegurl')) {
|
|
17
|
-
// Some browers (safari and ie edge) support HLS natively
|
|
18
|
-
current.src = vidUrl;
|
|
19
|
-
}
|
|
20
|
-
else if (Hls.isSupported()) {
|
|
21
|
-
// This will run in all other modern browsers
|
|
22
|
-
hls = new Hls();
|
|
23
|
-
hls.loadSource(vidUrl);
|
|
24
|
-
hls.attachMedia(current);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
// eslint-disable-next-line no-console
|
|
28
|
-
console.error("This is a legacy browser that doesn't support MSE");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return () => {
|
|
32
|
-
if (hls) {
|
|
33
|
-
hls.destroy();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}, [vidUrl, videoRef]);
|
|
37
|
-
return _jsx("video", { ref: videoRef, ...props });
|
|
38
|
-
};
|
|
39
|
-
export const MuxVideo = forwardRef(MuxVideoForward);
|
|
40
|
-
export const NewMuxVideo = ({ muxId }) => {
|
|
41
|
-
return (_jsx(VideoPlayerWithControls, { playbackId: muxId, poster: 'https://image.mux.com/' + muxId + '/thumbnail.png?time=1', onError: (error) => {
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
|
-
console.log(error);
|
|
44
|
-
}, onLoaded: () => undefined, onSize: () => undefined }));
|
|
45
|
-
};
|