🎥 Make videos programmatically with React
outline for /lambda website
Jonny Burgere28407696251
diff --git a/packages/docs/components/LambdaSplash/BuildApps.tsx b/packages/docs/components/LambdaSplash/BuildApps.tsxnew file mode 100644index 0000000000..7811e19659--- /dev/null+++ b/packages/docs/components/LambdaSplash/BuildApps.tsx@@ -0,0 +1,80 @@+import React from "react";+import { Spacer } from "../layout/Spacer";++const panel: React.CSSProperties = {+ backgroundColor: "var(--ifm-background-color)",+ boxShadow: "var(--box-shadow)",+ padding: 10,+ borderRadius: 15,+ flex: 1,+ paddingTop: 30,+ paddingBottom: 10,+ minHeight: 500,+ display: "flex",+ flexDirection: "column",+};++const center: React.CSSProperties = {+ textAlign: "center",+};++const row: React.CSSProperties = {+ display: "flex",+ flexDirection: "row",+};++const step: React.CSSProperties = {+ flex: 1,+ ...panel,+};++const stepTitle: React.CSSProperties = {+ textAlign: "center",+ fontSize: "1.3em",+};++export const BuildApps: React.FC = () => {+ return (+ <div>+ <h1 style={center}>Build Video Apps</h1>+ <br />+ <div style={row}>+ <div style={step}>+ <h2 style={stepTitle}>Remotion</h2>+ Write videos in React.+ <ul>+ <li>Use the Web to create graphics</li>+ <li>Consume user input and APIs</li>+ <li>Render real MP4 videos</li>+ </ul>+ </div>+ <Spacer />+ <Spacer />+ <Spacer />+ <div style={step}>+ <h2 style={stepTitle}>Remotion Player</h2>+ Embeddable interactive videos+ <ul>+ <li>Preview videos in the browser</li>+ <li>React to user input</li>+ </ul>+ </div>+ <Spacer />+ <Spacer />+ <Spacer />+ <div style={step}>+ <h2 style={stepTitle}>Remotion Lambda</h2>+ Render at scale+ <ul>+ <li>Render videos in the cloud</li>+ </ul>+ </div>+ </div>+ <br />+ <p style={center}>+ All Remotion products are source-available, for self-hosting, free for+ individuals and small businesses, with company licensing available.+ </p>+ </div>+ );+};diff --git a/packages/docs/components/LambdaSplash/Easy.tsx b/packages/docs/components/LambdaSplash/Easy.tsxnew file mode 100644index 0000000000..37b4dc90ce--- /dev/null+++ b/packages/docs/components/LambdaSplash/Easy.tsx@@ -0,0 +1,28 @@+import React from "react";+import styles from "./easy.module.css";++export const LambdaEasy: React.FC = () => {+ return (+ <div className={styles.row}>+ <div className={styles.tile}>+ <img+ src="/img/mp4.png"+ style={{+ width: 110,+ }}+ />+ </div>+ <div className={styles.tile}>+ <h2 className={styles.title}>+ <span className={styles.realgradient}>Easy</span> to setup.+ </h2>+ <p>+ We{"'"}ve figured out hard problems such as cloud architecture,+ scheduling and progress reporting and provide you with a solution that+ you can deploy to your own account by following a series of+ well-defined steps.+ </p>+ </div>+ </div>+ );+};diff --git a/packages/docs/components/LambdaSplash/Fast.tsx b/packages/docs/components/LambdaSplash/Fast.tsxnew file mode 100644index 0000000000..7b02db854c--- /dev/null+++ b/packages/docs/components/LambdaSplash/Fast.tsx@@ -0,0 +1,27 @@+import React from "react";+import styles from "./fast.module.css";++export const LambdaFast: React.FC = () => {+ return (+ <div className={styles.row}>+ <div className={styles.tile}>+ <img+ src="/img/mp4.png"+ style={{+ width: 110,+ }}+ />+ </div>+ <div className={styles.tile}>+ <h2 className={styles.title}>+ Fast because <span className={styles.realgradient}>distributed</span>+ </h2>+ <p>+ Because you write videos declaratively in React, rendering can be+ distributed to many Lambda functions which can each perform work+ independently. The Remotion masterplan has come alive.+ </p>+ </div>+ </div>+ );+};diff --git a/packages/docs/components/LambdaSplash/buildapps.module.css b/packages/docs/components/LambdaSplash/buildapps.module.cssnew file mode 100644index 0000000000..07ec64502a--- /dev/null+++ b/packages/docs/components/LambdaSplash/buildapps.module.css@@ -0,0 +1,13 @@+.panel {+ background-color: var(--ifm-background-color);+ box-shadow: var(--box-shadow);+ padding: 10px;+ border-radius: 15px;+ flex: 1;+ text-align: center;+ padding-top: 30px;+ padding-bottom: 10px;+ min-height: 500px;+ display: flex;+ flex-direction: column;+}diff --git a/packages/docs/components/LambdaSplash/easy.module.css b/packages/docs/components/LambdaSplash/easy.module.cssnew file mode 100644index 0000000000..7f1b8b40c5--- /dev/null+++ b/packages/docs/components/LambdaSplash/easy.module.css@@ -0,0 +1,37 @@+.row {+ display: flex;+ flex-direction: row;+}++.tile {+ flex: 1;+}++.title {+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+}++.realgradient {+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+}+++@media screen and (max-width: 900px) {+ .row {+ flex-direction: column-reverse;+ }+ .realmp4container {+ justify-content: flex-start;+ }+ .icon {+ animation: none;+ margin-bottom: 30px;+ }+}+diff --git a/packages/docs/components/LambdaSplash/fast.module.css b/packages/docs/components/LambdaSplash/fast.module.cssnew file mode 100644index 0000000000..7f1b8b40c5--- /dev/null+++ b/packages/docs/components/LambdaSplash/fast.module.css@@ -0,0 +1,37 @@+.row {+ display: flex;+ flex-direction: row;+}++.tile {+ flex: 1;+}++.title {+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+}++.realgradient {+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+}+++@media screen and (max-width: 900px) {+ .row {+ flex-direction: column-reverse;+ }+ .realmp4container {+ justify-content: flex-start;+ }+ .icon {+ animation: none;+ margin-bottom: 30px;+ }+}+diff --git a/packages/docs/components/LandingPage/real-mp4-videos.tsx b/packages/docs/components/LandingPage/real-mp4-videos.tsxindex b1108db0ec..871bb90b6b 100644--- a/packages/docs/components/LandingPage/real-mp4-videos.tsx+++ b/packages/docs/components/LandingPage/real-mp4-videos.tsx@@ -14,6 +14,7 @@ export const RealMP4Videos: React.FC = () => {if (!current) {return;}+const observer = new IntersectionObserver(callback, {root: null,threshold: 0.5,@@ -21,10 +22,10 @@ export const RealMP4Videos: React.FC = () => {observer.observe(current);return () => observer.unobserve(current);- }, []);+ }, [callback]);return (- <div className={styles.realvideos} ref={ref}>+ <div ref={ref} className={styles.realvideos}><div><h2 className={styles.realtitle}>Real <span className={styles.realgradient}>.mp4</span> videos@@ -43,7 +44,7 @@ export const RealMP4Videos: React.FC = () => {width: 110,animationPlayState: isIntersecting ? "running" : "paused",}}- ></img>+ /></div></div>);diff --git a/packages/docs/components/LandingPage/realvideos.module.css b/packages/docs/components/LandingPage/realvideos.module.cssindex fff1cc82ce..0b94d87c98 100644--- a/packages/docs/components/LandingPage/realvideos.module.css+++ b/packages/docs/components/LandingPage/realvideos.module.css@@ -3,6 +3,8 @@flex-direction: row;}++.realtitle {font-size: 2.5em;font-weight: 700;diff --git a/packages/docs/components/layout/Spacer.tsx b/packages/docs/components/layout/Spacer.tsxindex 5fdc03b74c..21fb4b638b 100644--- a/packages/docs/components/layout/Spacer.tsx+++ b/packages/docs/components/layout/Spacer.tsx@@ -1,5 +1,5 @@import React from "react";export const Spacer: React.FC = () => {- return <div style={{ width: 4, height: 4 }}></div>;+ return <div style={{ width: 4, height: 4 }} />;};diff --git a/packages/docs/src/pages/lambda/index.tsx b/packages/docs/src/pages/lambda/index.tsxindex 5bb92d9471..76b9199d06 100644--- a/packages/docs/src/pages/lambda/index.tsx+++ b/packages/docs/src/pages/lambda/index.tsx@@ -5,6 +5,9 @@ import { RenderTimes } from "../../../components/LambdaSplash/RenderTimes";import { Disclaimers } from "../../../components/LambdaSplash/Disclaimers";import Head from "@docusaurus/Head";import { LambdaLogo } from "../../../components/LambdaSplash/LambdaLogo";+import { LambdaFast } from "../../../components/LambdaSplash/Fast";+import { LambdaEasy } from "../../../components/LambdaSplash/Easy";+import { BuildApps } from "../../../components/LambdaSplash/BuildApps";const container: React.CSSProperties = {maxWidth: 1000,@@ -17,7 +20,7 @@ export default () => {return (<Layout><Head>- <title>@remotion/lambda</title>+ <title>Remotion Lambda - A distributed video renderer</title><metaname="description"content="Render Remotion videos fast and at scale on AWS Lambda."@@ -38,6 +41,14 @@ export default () => {<div><RenderTimes /></div>+ <br />+ <div>+ <LambdaFast />+ <br />+ <LambdaEasy />+ </div>++ <BuildApps /><div><Disclaimers /></div>