Skip to content

🎥 Make videos programmatically with React

aha

Jonny Burgerbfe3f9983e8f
diff --git a/packages/docs/docs/audio.md b/packages/docs/docs/audio.md
index 231c178bee..9352c70247 100644
--- a/packages/docs/docs/audio.md
+++ b/packages/docs/docs/audio.md
@@ -140,24 +140,20 @@ In the [Remotion Studio](/docs/terminology#remotion-studio) or in the [Remotion
Make values for [`volume`](#volume) greater than `1` result in amplification during renders.
In the Remotion Studio, the volume will be limited to `1`, since the browser cannot amplify audio.
-## Credits
+## See also
+
+- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/audio/Audio.tsx)
+- [Using audio](/docs/using-audio)
+- [Audio visualization](/docs/audio-visualization)
+- [`<Video />`](/docs/video)
<Credits contributors={[
{
-name: "Sahil Bhardwaj",
username: "evoxf1",
-contributionType: "Tone Frequency Prop & Documentation."
+contribution: "Tone Frequency Prop & Documentation."
},
{
-name: "Jonny Burger",
-username: "jonnyburger",
-contributionType: "Tone Frequency Prop & Documentation."
+username: "JonnyBurger",
+contribution: "Tone Frequency Prop & Documentation."
},
]} />
-
-## See also
-
-- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/audio/Audio.tsx)
-- [Using audio](/docs/using-audio)
-- [Audio visualization](/docs/audio-visualization)
-- [`<Video />`](/docs/video)
diff --git a/packages/docs/docs/creating-a-library.md b/packages/docs/docs/creating-a-library.md
index 1e9804376b..37b6b47ce4 100644
--- a/packages/docs/docs/creating-a-library.md
+++ b/packages/docs/docs/creating-a-library.md
@@ -25,16 +25,13 @@ You have three options to publish your library:
- **Sell it yourself via the NPM Kiosk**: See [NPM Kiosk](https://remotion.pro/npm-kiosk) for more info.
- **Apply to be listed in the [Remotion Store](https://www.remotion.pro/store)**: E-Mail [[email protected]](mailto:[email protected]) to pitch.
-## Credits
+## See also
+
+- [Contributing to Remotion](/docs/contributing)
<Credits contributors={[
{
-name: "Mohit Yadav",
username: "Just-Moh-it",
-contributionType: "Added library starter template docs."
+contribution: "Added library starter template docs."
},
]} />
-
-## See also
-
-- [Contributing to Remotion](/docs/contributing)
diff --git a/packages/docs/docs/easing.md b/packages/docs/docs/easing.md
index 93530a04cc..1386068186 100644
--- a/packages/docs/docs/easing.md
+++ b/packages/docs/docs/easing.md
@@ -304,16 +304,13 @@ static inOut(easing: (t: number) => number): (t: number) => number;
Makes any easing function symmetrical. The easing function will run forwards for half of the duration, then backwards for the rest of the duration.
-## Credits
+## See also
+
+- [Source code for this helper](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/easing.ts)
<Credits contributors={[
{
-name: "Alubọsa",
username: "kaf-lamed-beyt",
-contributionType: "Updated Easing Documentation."
+contribution: "Updated Easing Documentation."
},
]} />
-
-## See also
-
-- [Source code for this helper](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/easing.ts)
diff --git a/packages/docs/docs/motion-blur/camera-motion-blur.md b/packages/docs/docs/motion-blur/camera-motion-blur.md
index 6624025e27..8b606be0bf 100644
--- a/packages/docs/docs/motion-blur/camera-motion-blur.md
+++ b/packages/docs/docs/motion-blur/camera-motion-blur.md
@@ -104,21 +104,17 @@ export const MyComposition = () => {
<CameraMotionBlurExample />
-## Credits
+## See also
+
+- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/motion-blur/src/CameraMotionBlur.tsx)
<Credits contributors={[
{
-name: "Marcus Stenbeck",
username: "marcusstenbeck",
-contributionType: "Implemented the feature & Documentation."
+contribution: "Implemented the feature & Documentation."
},
{
-name: "UmungoBungo",
username: "UmungoBungo",
-contributionType: "Inspired the Camera Motion Blur feature."
+contribution: "Inspired the Camera Motion Blur feature."
},
]} />
-
-## See also
-
-- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/motion-blur/src/CameraMotionBlur.tsx)
diff --git a/packages/docs/docs/motion-blur/trail.md b/packages/docs/docs/motion-blur/trail.md
index dd17654ec8..bf9934035f 100644
--- a/packages/docs/docs/motion-blur/trail.md
+++ b/packages/docs/docs/motion-blur/trail.md
@@ -66,13 +66,10 @@ export const MyComposition = () => {
<TrailExample />
-## Credits
-
<Credits contributors={[
{
-name: "UmungoBungo",
username: "UmungoBungo",
-contributionType: "Implemented Trail feature & Docs."
+contribution: "Implemented Trail feature & Docs."
},
]} />
diff --git a/packages/docs/docs/player/thumbnail.md b/packages/docs/docs/player/thumbnail.md
index 2a449e3be4..1da11e7548 100644
--- a/packages/docs/docs/player/thumbnail.md
+++ b/packages/docs/docs/player/thumbnail.md
@@ -277,18 +277,15 @@ ref.current?.addEventListener("error", (e) => {
See: [`<Player>` -> Handling errors](/docs/player/player#handling-errors)
-## Credits
+## See also
+
+- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/player/src/Thumbnail.tsx)
+- [`<Composition>`](/docs/composition)
+- [`<Player>`](/docs/player)
<Credits contributors={[
{
-name: "Antoine Caron",
username: "Slashgear",
-contributionType: "Implementd the featurea & updated the documentation."
+contribution: "Implementd the featurea & updated the documentation."
},
]} />
-
-## See also
-
-- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/player/src/Thumbnail.tsx)
-- [`<Composition>`](/docs/composition)
-- [`<Player>`](/docs/player)
diff --git a/packages/docs/docs/spline.md b/packages/docs/docs/spline.md
index 6bb87499c6..e2ea0a7241 100644
--- a/packages/docs/docs/spline.md
+++ b/packages/docs/docs/spline.md
@@ -193,9 +193,8 @@ npm run build
<Credits contributors={[
{
-name: "Dhroov Makwana",
username: "pabloescoder",
-contributionType: "Added Spline tutorial on exporting a spline design and animating in remotion."
+contribution: "Added Spline tutorial on exporting a spline design and animating in remotion."
},
]} />
diff --git a/packages/docs/src/components/Credits.tsx b/packages/docs/src/components/Credits.tsx
index 749761d485..d88e32975e 100644
--- a/packages/docs/src/components/Credits.tsx
+++ b/packages/docs/src/components/Credits.tsx
@@ -1,9 +1,7 @@
import { useColorMode } from "@docusaurus/theme-common";
import React from "react";
-const containerStyle: React.CSSProperties = {
- margin: "20px 0",
-};
+const containerStyle: React.CSSProperties = {};
const cardContainerStyle: React.CSSProperties = {
display: "flex",
@@ -12,84 +10,122 @@ const cardContainerStyle: React.CSSProperties = {
};
const avatarStyle: React.CSSProperties = {
- width: "100px",
- height: "100px",
+ width: 70,
+ height: 70,
borderRadius: "50%",
marginRight: "20px",
flexShrink: 0,
- border: "2px solid #D6D6D6",
};
const linkStyle: React.CSSProperties = {
textDecoration: "none",
- fontSize: "1.2em",
+ fontSize: "0.9em",
color: "#000000",
};
interface Contributor {
- name: string;
username: string;
- contributionType: string;
+ contribution: string;
}
interface CreditsProps {
contributors: Contributor[];
}
-export const Credits: React.FC<CreditsProps> = ({ contributors }) => {
+const ContributorComp: React.FC<{
+ contributor: Contributor;
+}> = ({ contributor }) => {
const { colorMode } = useColorMode();
const textColor = colorMode === "dark" ? "#ffffff" : "#000000";
- const backgroundColor = colorMode === "dark" ? "#333333" : "#ffffff";
const cardStyle: React.CSSProperties = {
maxWidth: "300px",
width: "100%",
borderRadius: "10px",
overflow: "hidden",
- margin: "10px",
- padding: "10px",
display: "flex",
color: textColor,
- backgroundColor,
+ alignItems: "center",
+ marginTop: 5,
+ marginBottom: 5,
};
+ if (!contributor.username) {
+ throw new Error("Contributor username is required");
+ }
+
+ if (!contributor.contribution) {
+ throw new Error("Contributor contribution is required");
+ }
+
+ return (
+ <a
+ href={`https://github.com/${contributor.username}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ style={{ ...linkStyle, color: textColor }}
+ >
+ <div key={contributor.username} style={cardStyle}>
+ <img
+ src={`https://github.com/${contributor.username}.png`}
+ alt={contributor.username}
+ style={avatarStyle}
+ />
+ <div
+ style={{
+ color: textColor,
+ display: "flex",
+ flexDirection: "column",
+ }}
+ >
+ <strong>{contributor.username}</strong>
+ <div
+ style={{
+ color: textColor,
+ lineHeight: 1.4,
+ }}
+ >
+ {contributor.contribution}
+ </div>
+ </div>
+ </div>
+ </a>
+ );
+};
+
+const titleContainer: React.CSSProperties = {
+ display: "flex",
+ flexDirection: "row",
+ alignItems: "center",
+ marginBottom: 15,
+};
+
+const titleLine: React.CSSProperties = {
+ height: 1,
+ backgroundColor: "var(--light-text-color)",
+ flex: 1,
+};
+
+const title: React.CSSProperties = {
+ marginRight: 10,
+ fontFamily: "GT Planar",
+ color: "var(--light-text-color)",
+};
+
+export const Credits: React.FC<CreditsProps> = ({ contributors }) => {
return (
<div style={containerStyle}>
+ <div style={titleContainer}>
+ <div style={title}>CONTRIBUTORS</div>
+ <div style={titleLine} />
+ </div>
<div style={cardContainerStyle}>
{contributors.map((contributor) => (
- <div key={contributor.username} style={cardStyle}>
- <img
- src={`https://github.com/${contributor.username}.png`}
- alt={contributor.username}
- style={avatarStyle}
- />
- <div
- style={{
- color: textColor,
- display: "flex",
- flexDirection: "column",
- }}
- >
- <a
- href={`https://github.com/${contributor.username}`}
- target="_blank"
- rel="noopener noreferrer"
- style={{ ...linkStyle, color: textColor }}
- >
- <strong>{contributor.name}</strong>
- </a>
- <p
- style={{
- color: textColor,
- fontSize: "0.9em",
- marginTop: "5px",
- }}
- >
- {contributor.contributionType}
- </p>
- </div>
- </div>
+ <ContributorComp
+ key={contributor.username}
+ contributor={contributor}
+ />
))}
</div>
</div>