🎥 Make videos programmatically with React
sections
Jonny Burger0ed8cb794795
diff --git a/packages/docs/.npmrc b/packages/docs/.npmrcnew file mode 100644index 0000000000..521a9f7c07--- /dev/null+++ b/packages/docs/.npmrc@@ -0,0 +1 @@+legacy-peer-deps=truediff --git a/packages/docs/components/LandingPage/FreePricing.tsx b/packages/docs/components/LandingPage/FreePricing.tsxnew file mode 100644index 0000000000..d5bfabcf81--- /dev/null+++ b/packages/docs/components/LandingPage/FreePricing.tsx@@ -0,0 +1,33 @@+import React from "react";+import styled from "styled-components";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ justify-content: flex-end;+ text-align: right;+`;++const Title = styled.h2`+ 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;+`;++export const FreePricing: React.FC = () => {+ return (+ <Row>+ <div>+ <Title>Funded by companies</Title>+ <p>+ Remotion is free for individuals - you can even build a business on+ it! <br />+ As a company, you need a license to use Remotion. <br /> In return, we+ keep improving the Remotion experience.+ </p>+ </div>+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/editor.tsx b/packages/docs/components/LandingPage/editor.tsxnew file mode 100644index 0000000000..1296b2c226--- /dev/null+++ b/packages/docs/components/LandingPage/editor.tsx@@ -0,0 +1,41 @@+import React from "react";+import styled from "styled-components";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ justify-content: flex-end;+ text-align: right;+`;++const Title = styled.h2`+ 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;+ text-align: right;+`;++const Mp4 = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;++export const LightningFastEditor: React.FC = () => {+ return (+ <Row>+ <div>+ <Title>+ Fast and <br /> delightful editing+ </Title>+ <p>+ Preview your video in the browser. <br />+ Fast refresh while the video is playing. <br />+ Scrub through the timeline to get every frame perfect.+ </p>+ </div>+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/parametrize.tsx b/packages/docs/components/LandingPage/parametrize.tsxnew file mode 100644index 0000000000..e0471dedeb--- /dev/null+++ b/packages/docs/components/LandingPage/parametrize.tsx@@ -0,0 +1,34 @@+import React from "react";+import styled from "styled-components";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ text-align: left;+`;++const Title = styled.h2`+ 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;+ text-align: left;+`;++export const Parametrize: React.FC = () => {+ return (+ <Row>+ <div>+ <Title>+ Programmatic content <br />+ and rendering+ </Title>+ <p>+ Fetch data from an API and use it as the content. <br />+ Render videos programmatically using our server-side APIs.+ </p>+ </div>+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/real-mp4-videos.tsx b/packages/docs/components/LandingPage/real-mp4-videos.tsxindex cf882017d0..74c99c33bb 100644--- a/packages/docs/components/LandingPage/real-mp4-videos.tsx+++ b/packages/docs/components/LandingPage/real-mp4-videos.tsx@@ -9,10 +9,23 @@ const Title = styled.h2`line-height: 1.1;`;+const Mp4 = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;+export const RealMP4Videos: React.FC = () => {return (<div>- <Title>Real MP4 videos</Title>+ <Title>+ Real <Mp4>.mp4</Mp4> videos+ </Title>+ <p>+ Remotion renders all frames to images <br /> and encodes them to a real+ video - audio support included. <br /> WebM and other formats are also+ supported.+ </p></div>);};diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.jsonindex bcdbcfcba9..c1525653dc 100644--- a/packages/docs/package-lock.json+++ b/packages/docs/package-lock.json@@ -9517,19 +9517,6 @@"rc": "cli.js"}},- "node_modules/react": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",- "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "object-assign": "^4.1.1"- },- "engines": {- "node": ">=0.10.0"- }- },"node_modules/react-base16-styling": {"version": "0.6.0","resolved": "https://registry.npmjs.org/react-base16-styling/-/react-base16-styling-0.6.0.tgz",@@ -9686,20 +9673,6 @@"node": ">= 6"}},- "node_modules/react-dom": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",- "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "object-assign": "^4.1.1",- "scheduler": "^0.20.2"- },- "peerDependencies": {- "react": "17.0.2"- }- },"node_modules/react-error-overlay": {"version": "6.0.9","resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz",@@ -10568,16 +10541,6 @@"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz","integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="},- "node_modules/scheduler": {- "version": "0.20.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",- "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "object-assign": "^4.1.1"- }- },"node_modules/schema-utils": {"version": "3.0.0","resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",@@ -21294,16 +21257,6 @@"strip-json-comments": "~2.0.1"}},- "react": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",- "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",- "peer": true,- "requires": {- "loose-envify": "^1.1.0",- "object-assign": "^4.1.1"- }- },"react-base16-styling": {"version": "0.6.0","resolved": "https://registry.npmjs.org/react-base16-styling/-/react-base16-styling-0.6.0.tgz",@@ -21433,17 +21386,6 @@}}},- "react-dom": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",- "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",- "peer": true,- "requires": {- "loose-envify": "^1.1.0",- "object-assign": "^4.1.1",- "scheduler": "^0.20.2"- }- },"react-error-overlay": {"version": "6.0.9","resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz",@@ -21908,8 +21850,7 @@"remotion": {"version": "2.1.2","resolved": "https://registry.npmjs.org/remotion/-/remotion-2.1.2.tgz",- "integrity": "sha512-AWeoBuSM/pP5C/S/OMWEZE+84qtcFYzshyD3vk7k2eRJaKQxVYduVmu5wMIPH6AWg09eAoNhr9FuPqFyhsiEYA==",- "requires": {}+ "integrity": "sha512-AWeoBuSM/pP5C/S/OMWEZE+84qtcFYzshyD3vk7k2eRJaKQxVYduVmu5wMIPH6AWg09eAoNhr9FuPqFyhsiEYA=="},"remove-trailing-separator": {"version": "1.1.0",@@ -22207,16 +22148,6 @@"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz","integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="},- "scheduler": {- "version": "0.20.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",- "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",- "peer": true,- "requires": {- "loose-envify": "^1.1.0",- "object-assign": "^4.1.1"- }- },"schema-utils": {"version": "3.0.0","resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",diff --git a/packages/docs/src/css/custom.css b/packages/docs/src/css/custom.cssindex 0ca82174a4..b7069b44a6 100644--- a/packages/docs/src/css/custom.css+++ b/packages/docs/src/css/custom.css@@ -17,6 +17,15 @@--ifm-code-font-size: 95%;}+[data-theme="light"] {+ --text-color: #000;+ --light-text-color: #444;+}+[data-theme="dark"] {+ --text-color: #fff;+ --light-text-color: #aaa;+}+[data-theme="light"] .docusaurus-highlight-code-line {background-color: rgb(232, 232, 232);display: block;diff --git a/packages/docs/src/pages/new-landing.tsx b/packages/docs/src/pages/new-landing.tsxindex 1afd437157..c6c59c32e2 100644--- a/packages/docs/src/pages/new-landing.tsx+++ b/packages/docs/src/pages/new-landing.tsx@@ -1,7 +1,10 @@import Layout from "@theme/Layout";import React from "react";import styled from "styled-components";+import { LightningFastEditor } from "../../components/LandingPage/editor";+import { FreePricing } from "../../components/LandingPage/FreePricing";import { IfYouKnowReact } from "../../components/LandingPage/if-you-know-react";+import { Parametrize } from "../../components/LandingPage/parametrize";import { RealMP4Videos } from "../../components/LandingPage/real-mp4-videos";const Title = styled.h1`@@ -11,7 +14,11 @@ const Title = styled.h1`font-weight: 700;line-height: 1;-webkit-text-fill-color: transparent;- background: linear-gradient(to right, #000, #444);+ background: linear-gradient(+ to right,+ var(--text-color),+ var(--light-text-color)+ );-webkit-background-clip: text;width: 500px;`;@@ -48,6 +55,21 @@ const NewLanding: React.FC = () => {<br /><br /><RealMP4Videos></RealMP4Videos>+ <br />+ <br />+ <br />+ <br />+ <LightningFastEditor></LightningFastEditor>+ <br />+ <br />+ <br />+ <br />+ <Parametrize></Parametrize>+ <br />+ <br />+ <br />+ <br />+ <FreePricing></FreePricing></Content></Layout>);