π₯ Make videos programmatically with React
new showcase page
Jonny Burger44cbed28ca3d
diff --git a/packages/docs/src/components/VideoPreview.tsx b/packages/docs/src/components/VideoPreview.tsxindex f190ca50ec..a67d637374 100644--- a/packages/docs/src/components/VideoPreview.tsx+++ b/packages/docs/src/components/VideoPreview.tsx@@ -100,11 +100,9 @@ export const VideoPreview: React.FC<}, [height, width]);const frameStyle: React.CSSProperties = {- border: "2px solid #ccc",- borderRadius: "10px",+ border: "2px solid var(--border-color)",+ borderRadius: 5,backgroundColor: "var(--ifm-background-color)",- boxShadow: "var(--box-shadow)",- margin: "5px",overflow: "hidden",};diff --git a/packages/docs/src/pages/showcase/add.tsx b/packages/docs/src/pages/showcase/add.tsxindex c9c157563d..0460c8d2ef 100644--- a/packages/docs/src/pages/showcase/add.tsx+++ b/packages/docs/src/pages/showcase/add.tsx@@ -7,91 +7,86 @@ import styles from "./styles.module.css";const PageHeader: React.FC = () => {return (- <div className={headerStyles.row}>- <div style={{ flex: 1 }}>- <h1 className={headerStyles.title}>Add to showcase</h1>- <p>- The <a href="/showcase">Showcase</a> features videos made with- Remotion to show use cases, share code and celebrate the creations of- the Remotion community.- </p>- <p>- You too can add your creations to the showcase! Please read carefully- the instructions to make it as effortlessly as possible for us to- accept your video to the showcase.- </p>- <h2>Guidelines</h2>+ <div>+ <h1 className={headerStyles.title}>Add to showcase</h1>+ <p>+ The <a href="/showcase">Showcase</a> features videos made with Remotion+ to show use cases, share code and celebrate the creations of the+ Remotion community.+ </p>+ <p>+ You too can add your creations to the showcase! Please read carefully+ the instructions to make it as effortlessly as possible for us to accept+ your video to the showcase.+ </p>+ <h2>Guidelines</h2>+ <ul>+ <li>Metadata:</li><ul>- <li>Metadata:</li>+ <li>Title: Max 80 characters, no emojis, no CAPS text</li>+ <li>+ Description: Max 280 characters, use descriptive and neutral+ language, focusing on how Remotion was used for your project. To+ plug your project, use the links section.+ </li>+ <li>+ There are 4 types of links that you can add - all of them are+ optional:+ </li><ul>- <li>Title: Max 80 characters, no emojis, no CAPS text</li>+ <li>Video: A link to where you published your video originally.</li><li>- Description: Max 280 characters, use descriptive and neutral- language, focusing on how Remotion was used for your project. To- plug your project, use the links section.+ Source code: A direct link to the source code of the video if it+ is public.</li><li>- There are 4 types of links that you can add - all of them are- optional:+ Website: An opportunity to link to your product if you have one+ </li>+ <li>+ Tutorial: If you have a blog or video tutorial about the process+ of your video, you can link it.</li>- <ul>- <li>- Video: A link to where you published your video originally.- </li>- <li>- Source code: A direct link to the source code of the video if it- is public.- </li>- <li>- Website: An opportunity to link to your product if you have one- </li>- <li>- Tutorial: If you have a blog or video tutorial about the process- of your video, you can link it.- </li>- </ul></ul>- <li>- Order: The videos will be reshuffled every day again to balance out- the videos who appear on top.- </li>- <li>- Quality: We aim to keep a minimum bar of quality for the showcase,- therefore we will sometimes reject submissions. Don{"'"}t submit- videos that are overly simplistic, similar to videos already in the- showcase or don{"'"}t live up to your ability. Only submit your best- videos and if you submit multiple videos, remove the ones that you- like the least.- </li>- <li>- Permission: By submitting, you allow us to host your video and to- repost it on other channels like Twitter and Instagram (we will- always attribute you).- </li></ul>- <h2>How to submit</h2>- <ol>- <li>- <a href="https://showcase-upload.remotion.dev/" target="_blank">- Click here- </a>{" "}- to upload your video.- </li>- <li>- We will automatically host your video, and create static and- animated preview images. These assets are associated with the{" "}- <code>muxId</code>. Once uploaded, you will see a JSON markup and a- GitHub link where you can edit the list of showcase videos.- </li>- <li>- Edit the list of showcase videos on GitHub by adding the JSON object- to the bottom of the list. Fill in the placeholders in angle- brackets according to the guidelines above and send your pull- request.- </li>- </ol>- <p>We look forward to your submissions! π</p>- </div>+ <li>+ Order: The videos will be reshuffled every day again to balance out+ the videos who appear on top.+ </li>+ <li>+ Quality: We aim to keep a minimum bar of quality for the showcase,+ therefore we will sometimes reject submissions. Don{"'"}t submit+ videos that are overly simplistic, similar to videos already in the+ showcase or don{"'"}t live up to your ability. Only submit your best+ videos and if you submit multiple videos, remove the ones that you+ like the least.+ </li>+ <li>+ Permission: By submitting, you allow us to host your video and to+ repost it on other channels like Twitter and Instagram (we will always+ attribute you).+ </li>+ </ul>+ <h2>How to submit</h2>+ <ol>+ <li>+ <a href="https://showcase-upload.remotion.dev/" target="_blank">+ Click here+ </a>{" "}+ to upload your video.+ </li>+ <li>+ We will automatically host your video, and create static and animated+ preview images. These assets are associated with the{" "}+ <code>muxId</code>. Once uploaded, you will see a JSON markup and a+ GitHub link where you can edit the list of showcase videos.+ </li>+ <li>+ Edit the list of showcase videos on GitHub by adding the JSON object+ to the bottom of the list. Fill in the placeholders in angle brackets+ according to the guidelines above and send your pull request.+ </li>+ </ol>+ <p>We look forward to your submissions! π</p></div>);};diff --git a/packages/docs/src/pages/showcase/index.tsx b/packages/docs/src/pages/showcase/index.tsxindex c2546a2fca..c324354230 100644--- a/packages/docs/src/pages/showcase/index.tsx+++ b/packages/docs/src/pages/showcase/index.tsx@@ -1,6 +1,5 @@import Head from "@docusaurus/Head";import Layout from "@theme/Layout";-import clsx from "clsx";import React, { useCallback, useEffect, useMemo, useState } from "react";import { VideoPlayer } from "../../components/VideoPlayer";import { VideoPreview } from "../../components/VideoPreview";@@ -15,14 +14,26 @@ import styles from "./styles.module.css";const PageHeader: React.FC = () => {return (- <div className={headerStyles.row}>+ <div+ style={{+ maxWidth: "var(--ifm-container-width)",+ paddingLeft: 20,+ paddingRight: 20,+ margin: "auto",+ marginTop: 50,+ }}+ ><div style={{ flex: 1 }}><h1 className={headerStyles.title}>Showcase</h1>+ <p>Some awesome creations from the community, many with source code.</p><p>- Some awesome creations from the community, many with source code. Have- you made your own video with Remotion?{" "}+ Have you made your own video with Remotion?{" "}<a href="/showcase/add">Add it to the showcase!</a></p>+ <p>+ See more projects, applications and examples and libraries on the{" "}+ <a href="/docs/resources">Resources</a> page.+ </p></div></div>);@@ -126,11 +137,9 @@ const Showcase = () => {<meta property="og:image" content="/img/showcase.png" /><meta property="twitter:image" content="/img/showcase.png" /></Head>- <header className={clsx("hero ", styles.heroBanner)}>- <div className="container">- <PageHeader />- </div>- </header>+ <div>+ <PageHeader />+ </div><VideoPlayerhasNext={hasNext}hasPrevious={hasPrevious}@@ -140,14 +149,12 @@ const Showcase = () => {video={video}userHasInteractedWithPage={userHasInteractedWithPage}/>-<main><section className={styles.videos}><div className={styles.container} style={container}>{shuffledShowcaseVideos.map((vid) => {return (- // eslint-disable-next-line react/jsx-key- <div style={layoutStyle}>+ <div key={vid.muxId} style={layoutStyle}><VideoPreviewonClick={() => {setVideo(vid);