🎥 Make videos programmatically with React
landing page
Jonny Burger8e24a62a355d
diff --git a/packages/docs/components/LandingPage/parametrize.tsx b/packages/docs/components/LandingPage/parametrize.tsxindex 39c420f866..25e0fda70d 100644--- a/packages/docs/components/LandingPage/parametrize.tsx+++ b/packages/docs/components/LandingPage/parametrize.tsx@@ -107,6 +107,8 @@ export const Parametrize: React.FC = () => {</h2><p>Fetch data from an API and use it as the content. <br />+ Display it in real-time with the{" "}+ <a href="/player">@remotion/player</a>.<br />Render videos programmatically using our server-side APIs.</p><span style={{ fontSize: 13 }}>diff --git a/packages/docs/components/Player/Footer.tsx b/packages/docs/components/Player/Footer.tsxnew file mode 100644index 0000000000..06b15d3d77--- /dev/null+++ b/packages/docs/components/Player/Footer.tsx@@ -0,0 +1,81 @@+import React from "react";+import { Button } from "../layout/Button";+import styles from "./footer.module.css";++const container: React.CSSProperties = {+ width: "100%",+ backgroundColor: "#0B84F3",+ color: "white",+};++const half: React.CSSProperties = {+ display: "flex",+ flex: 1,+ flexDirection: "row",+};++const inner: React.CSSProperties = {+ textAlign: "center",+ display: "flex",+ justifyContent: "center",+ alignItems: "center",+ flexDirection: "column",+ paddingTop: 40,+ paddingBottom: 40,+ flex: 1,+};++export const PlayerPageFooter: React.FC = () => {+ return (+ <div className={styles.footerrow} style={container}>+ <div+ style={{+ ...half,+ justifyContent: "flex-end",+ }}+ >+ <div style={inner}>+ <h2 className={styles.title}>New to Remotion?</h2>+ <p>Learn about how to make videos in React.</p>+ <a href="/" style={{ textDecoration: "none" }}>+ <Button+ background="white"+ hoverColor="white"+ color="#0B84F3"+ loading={false}+ fullWidth={false}+ size="sm"+ >+ Learn Remotion+ </Button>+ </a>+ </div>+ </div>+ <div style={{ ...half, backgroundColor: "#0B84F3" }}>+ <div style={inner}>+ <h2+ className={styles.title}+ style={{+ color: "white",+ }}+ >+ Already used Remotion?+ </h2>+ <p style={{ color: "white" }}>Let{"'"}s get setup with the Player.</p>+ <a href="/docs/player" style={{ textDecoration: "none" }}>+ <Button+ background="white"+ hoverColor="white"+ color="#0B84F3"+ loading={false}+ fullWidth={false}+ size="sm"+ >+ Installation+ </Button>+ </a>+ </div>+ </div>+ </div>+ );+};diff --git a/packages/docs/components/Player/LandingHeader.tsx b/packages/docs/components/Player/LandingHeader.tsxindex e9869790ba..8c210e7160 100644--- a/packages/docs/components/Player/LandingHeader.tsx+++ b/packages/docs/components/Player/LandingHeader.tsx@@ -27,9 +27,9 @@ export const LandingHeader: React.FC = () => {React, and change them at runtime. Connect it to server-side renderingto turn them into real MP4 videos.</p>- <a className={styles.a} href="/docs">+ <a className={styles.a} href="/docs/player"><BlueButton size="sm" loading={false} fullWidth={false}>- Get started+ Documentation</BlueButton></a><br />diff --git a/packages/docs/components/Player/PoweredByRemotion.tsx b/packages/docs/components/Player/PoweredByRemotion.tsxindex 50e276efb3..7c035c0921 100644--- a/packages/docs/components/Player/PoweredByRemotion.tsx+++ b/packages/docs/components/Player/PoweredByRemotion.tsx@@ -1,22 +1,12 @@import React from "react";--const btn: React.CSSProperties = {- backgroundColor: "white",- padding: "10px 16px",- appearance: "none",- color: "#0B84F3",- border: "none",- fontFamily: "inherit",- fontWeight: "bold",- borderRadius: 8,- cursor: "pointer",- fontSize: 16,-};+import { Button } from "../layout/Button";+import styles from "./powered.module.css";export const PoweredByRemotion: React.FC = () => {return (<div style={{ background: `#0B84F3` }}><div+ className={styles.responsiverow}style={{maxWidth: 1000,paddingLeft: 16,@@ -26,8 +16,6 @@ export const PoweredByRemotion: React.FC = () => {paddingBottom: 30,color: `#fff`,display: "flex",- flexDirection: "row",- alignItems: "center",}}><div>@@ -41,12 +29,19 @@ export const PoweredByRemotion: React.FC = () => {perfect, before you embed it in a website.</p></div>- <div style={{ flex: 1 }} />+ <div className={styles.flexer} /><div>- <a href="/">- <button style={btn} type="button">+ <a href="/" style={{ textDecoration: "none" }}>+ <Button+ background="white"+ hoverColor="white"+ color="#0B84F3"+ loading={false}+ fullWidth={false}+ size="sm"+ >Learn more- </button>+ </Button></a></div></div>diff --git a/packages/docs/components/Player/features.module.css b/packages/docs/components/Player/features.module.cssindex d18e21ab54..a1a9eb619c 100644--- a/packages/docs/components/Player/features.module.css+++ b/packages/docs/components/Player/features.module.css@@ -16,3 +16,17 @@margin-top: 80px;margin-bottom: 80px;}++.row {+ display: flex;+ flex-direction: row;+ padding-top: 40px;+ padding-bottom: 40px;+ align-items: center;+}++@media (max-width: 1000px) {+ .row {+ flex-direction: column;+ }+}diff --git a/packages/docs/components/Player/features.tsx b/packages/docs/components/Player/features.tsxindex 1b327f4461..bf9e950f2a 100644--- a/packages/docs/components/Player/features.tsx+++ b/packages/docs/components/Player/features.tsx@@ -1,21 +1,17 @@+import useThemeContext from "@theme/hooks/useThemeContext";import React from "react";import styles from "./features.module.css";-const row: React.CSSProperties = {- display: "flex",- flexDirection: "row",- paddingTop: 40,- paddingBottom: 40,-};-const half: React.CSSProperties = {flex: 1,};export const PlayerFeatures: React.FC = () => {+ const { isDarkTheme } = useThemeContext();+return (<div className={styles.container}>- <div style={row}>+ <div className={styles.row}><div style={half}><h2 className={styles.title}><span className={styles.keyword}>Reactive</span> to data@@ -26,9 +22,17 @@ export const PlayerFeatures: React.FC = () => {</p></div><div style={{ width: 20 }} />- <div style={half} />+ <div style={half}>+ <video+ src={isDarkTheme ? "/img/reactive-dark.mp4" : "/img/reactive.mp4"}+ playsInline+ muted+ autoPlay+ loop+ />+ </div></div>- <div style={row}>+ <div className={styles.row}><div style={half}><h2 className={styles.title}>Extremely <span className={styles.keyword}>customizable</span>@@ -41,12 +45,24 @@ export const PlayerFeatures: React.FC = () => {</p></div><div style={{ width: 20 }} />- <div style={half} />+ <div style={half}>+ <video+ src={+ isDarkTheme+ ? "/img/customizable-dark.mp4"+ : "/img/customizable-light.mp4"+ }+ playsInline+ muted+ autoPlay+ loop+ />+ </div></div>- <div style={row}>+ <div className={styles.row}><div style={half}><h2 className={styles.title}>- Turn it into <span className={styles.keyword}>real videos</span>+ Turn it into real <span className={styles.keyword}> videos</span></h2><p>Connect to the Remotion server-side rendering APIs to turn the@@ -55,7 +71,17 @@ export const PlayerFeatures: React.FC = () => {</p></div><div style={{ width: 20 }} />- <div style={half} />+ <div style={half}>+ <video+ src={+ isDarkTheme ? "/img/pipeline-dark.mp4" : "/img/pipeline-light.mp4"+ }+ playsInline+ muted+ autoPlay+ loop+ />+ </div></div></div>);diff --git a/packages/docs/components/Player/footer.module.css b/packages/docs/components/Player/footer.module.cssnew file mode 100644index 0000000000..5f20abeb6b--- /dev/null+++ b/packages/docs/components/Player/footer.module.css@@ -0,0 +1,14 @@+.title {+ font-size: 2em;+}++.footerrow {+ display: flex;+ flex-direction: row;+}++@media (max-width: 1000px) {+ .footerrow {+ flex-direction: column;+ }+}diff --git a/packages/docs/components/Player/landing.module.css b/packages/docs/components/Player/landing.module.cssindex 9cf86a7cfa..b3906bd237 100644--- a/packages/docs/components/Player/landing.module.css+++ b/packages/docs/components/Player/landing.module.css@@ -21,6 +21,11 @@-webkit-background-clip: text;max-width: 600px;}+@media screen and (max-width: 1000px) {+ .title {+ font-size: 2em;+ }+}.p {text-align: center;diff --git a/packages/docs/components/Player/powered.module.css b/packages/docs/components/Player/powered.module.cssnew file mode 100644index 0000000000..846fe2343f--- /dev/null+++ b/packages/docs/components/Player/powered.module.css@@ -0,0 +1,24 @@+.responsiverow {+ display: flex;+ flex-direction: row;+ align-items: center;+}++@media (max-width: 1000px) {+ .responsiverow {+ flex-direction: column;+ align-items: flex-start;+ }+}++.flexer {+ flex: 1;+}++@media (max-width: 1000px) {+ .flexer {+ flex: none;+ height: 20px;+ display: block;+ }+}diff --git a/packages/docs/docs/player/player.md b/packages/docs/docs/player/player.mdindex b2338534f5..9a17bb2b48 100644--- a/packages/docs/docs/player/player.md+++ b/packages/docs/docs/player/player.md@@ -9,8 +9,6 @@ import TabItem from '@theme/TabItem';import { PlayerExample } from "../../components/Player.tsx";import { ExperimentalBadge } from "../../components/Experimental.tsx";-<ExperimentalBadge message="This player is currently in a beta state. We are done with the most important features we wanted to implement and will promote the Player to stable in the next version, if there is no feedback from users."/>-Using the Remotion Player you can embed Remotion videos in any React app and customize the video content at runtime.## Demodiff --git a/packages/docs/src/pages/player/index.tsx b/packages/docs/src/pages/player/index.tsxindex 62f47fc1b6..d98b2a0147 100644--- a/packages/docs/src/pages/player/index.tsx+++ b/packages/docs/src/pages/player/index.tsx@@ -3,6 +3,7 @@ import Layout from "@theme/Layout";import { LandingHeader } from "../../../components/Player/LandingHeader";import { PlayerFeatures } from "../../../components/Player/features";import { PoweredByRemotion } from "../../../components/Player/PoweredByRemotion";+import { PlayerPageFooter } from "../../../components/Player/Footer";const container: React.CSSProperties = {maxWidth: 1000,@@ -24,6 +25,7 @@ export default () => {<div style={container}><PlayerFeatures /></div>+ <PlayerPageFooter /></Layout>);};diff --git a/packages/docs/static/img/customizable-dark.mp4 b/packages/docs/static/img/customizable-dark.mp4new file mode 100644index 0000000000..29661d0627Binary files /dev/null and b/packages/docs/static/img/customizable-dark.mp4 differdiff --git a/packages/docs/static/img/customizable-light.mp4 b/packages/docs/static/img/customizable-light.mp4new file mode 100644index 0000000000..417059b7e4Binary files /dev/null and b/packages/docs/static/img/customizable-light.mp4 differdiff --git a/packages/docs/static/img/pipeline-dark.mp4 b/packages/docs/static/img/pipeline-dark.mp4new file mode 100644index 0000000000..e1fdf2fe95Binary files /dev/null and b/packages/docs/static/img/pipeline-dark.mp4 differdiff --git a/packages/docs/static/img/pipeline-light.mp4 b/packages/docs/static/img/pipeline-light.mp4new file mode 100644index 0000000000..576737d0d4Binary files /dev/null and b/packages/docs/static/img/pipeline-light.mp4 differdiff --git a/packages/docs/static/img/reactive-dark.mp4 b/packages/docs/static/img/reactive-dark.mp4new file mode 100644index 0000000000..f3a65b7205Binary files /dev/null and b/packages/docs/static/img/reactive-dark.mp4 differdiff --git a/packages/docs/static/img/reactive.mp4 b/packages/docs/static/img/reactive.mp4new file mode 100644index 0000000000..3bbedf8182Binary files /dev/null and b/packages/docs/static/img/reactive.mp4 differ