Skip to content

πŸŽ₯ Make videos programmatically with React

improve language in docs

Jonny Burger066b4ab7dc61
diff --git a/packages/docs/.prettierignore b/packages/docs/.prettierignore
index a0279e8430..e69de29bb2 100644
--- a/packages/docs/.prettierignore
+++ b/packages/docs/.prettierignore
@@ -1 +0,0 @@
-sidebars.js
diff --git a/packages/docs/.prettierrc.js b/packages/docs/.prettierrc.js
index 887695ce17..079276c4e8 100644
--- a/packages/docs/.prettierrc.js
+++ b/packages/docs/.prettierrc.js
@@ -1,14 +1,15 @@
module.exports = {
singleQuote: false,
bracketSpacing: true,
- useTabs: true,
+ useTabs: false,
+ tabWidth: 2,
overrides: [
{
- files: ['*.yml'],
+ files: ["*.yml"],
options: {
singleQuote: false,
},
},
],
- plugins: [require.resolve('prettier-plugin-organize-imports')],
+ plugins: [require.resolve("prettier-plugin-organize-imports")],
};
diff --git a/packages/docs/docs/paths/get-parts.md b/packages/docs/docs/paths/get-parts.md
index 58c54dd431..b97c61de24 100644
--- a/packages/docs/docs/paths/get-parts.md
+++ b/packages/docs/docs/paths/get-parts.md
@@ -102,7 +102,7 @@ console.log(parts[0].getPointAtLength(50)); // { x: 50, y: 0 }
### `getTangentAtLength()`
-Returns tagent point `x` and `y` of a point along the line of a part. The input must be between `0` and the return value of [`getLength`](/docs/paths/get-length).
+Returns tangents `x` and `y` of a point along the line of a part. The input must be between `0` and the return value of [`getLength()`](/docs/paths/get-length).
```tsx twoslash
import { getParts } from "@remotion/paths";
diff --git a/packages/docs/docs/paths/get-point-at-length.md b/packages/docs/docs/paths/get-point-at-length.md
index 729d483a2e..b6f377f8d7 100644
--- a/packages/docs/docs/paths/get-point-at-length.md
+++ b/packages/docs/docs/paths/get-point-at-length.md
@@ -26,7 +26,7 @@ getPointAtLength("remotion", 50); // Error: Malformed path data: ...
## Example: Getting the middle point of a path
-Use [`getLength()`](/docs/paths/get-length) to get the total length of a path and then multiply it with a number between 0 and 1 to get any point on the path. For example, `length * 0.5` to get the coordinate of the middle of the path.
+Use [`getLength()`](/docs/paths/get-length) to get the total length of a path and then multiply it with a number between 0 and 1 to get any point on the path. For example, `length * 0.5` to get the coordinates in the middle of the path.
```tsx twoslash
import { getLength, getPointAtLength } from "@remotion/paths";
diff --git a/packages/docs/docs/paths/index.md b/packages/docs/docs/paths/index.md
index a1bfe04591..7d92074d36 100644
--- a/packages/docs/docs/paths/index.md
+++ b/packages/docs/docs/paths/index.md
@@ -2,14 +2,14 @@
title: "@remotion/paths"
---
-A package providing utility functions for dealing with SVG paths. This package consists of code from [`svg-path-properties`](https://www.npmjs.com/package/svg-path-properties) and [`svg-path-reverse`](https://github.com/Pomax/svg-path-reverse#readme) with the following improvements:
+A package providing utility functions for dealing with SVG paths. This package includes code from [`svg-path-properties`](https://www.npmjs.com/package/svg-path-properties), [`svg-path-reverse`](https://github.com/Pomax/svg-path-reverse#readme) and [d3-interpolate-path](https://github.com/pbeshai/d3-interpolate-path) with the following improvements:
- Functional style APIs
- First class Typescript types
- Documentation with examples
- ESM import style
-No dependencies are needed, meaning this package can be used independently of Remotion.
+This package has no dependencies, meaning this package can be used without Remotion.
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
diff --git a/packages/docs/docs/paths/interpolate-path.md b/packages/docs/docs/paths/interpolate-path.md
index 7ab3a86833..00cc6b7efd 100644
--- a/packages/docs/docs/paths/interpolate-path.md
+++ b/packages/docs/docs/paths/interpolate-path.md
@@ -6,12 +6,12 @@ _Part of the [`@remotion/paths`](/docs/paths) package._
Interpolates between two SVG paths. The function takes three arguments:
-- The `value`, which is a number.
+- `value`, which is a number.
- If it is `0`, the first path is returned.
- If it is `1`, the second path is returned.
- If it is inbetween or outside the range, the path is interpolated.
-- The `firstPath`, which must be a valid SVG path.
-- The `secondPath`, which must be a valid SVG path.
+- `firstPath`, which must be a valid SVG path.
+- `secondPath`, which must be a valid SVG path.
```tsx twoslash
import { interpolatePath } from "@remotion/paths";
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index b894563d5f..b8eb65a957 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -1,343 +1,343 @@
module.exports = {
- lambdaSidebar: [
- {
- type: "link",
- label: "← Back to main docs",
- href: "/docs",
- },
- "lambda",
- {
- collapsed: false,
- type: "category",
- label: "CLI",
- items: [
- "lambda/cli",
- "lambda/cli/sites",
- "lambda/cli/functions",
- "lambda/cli/render",
- "lambda/cli/still",
- "lambda/cli/policies",
- "lambda/cli/regions",
- "lambda/cli/quotas",
- ],
- },
- "lambda/setup",
- "lambda/permissions",
- "lambda/region-selection",
- "lambda/concurrency",
- "lambda/runtime",
- "lambda/disk-size",
- "lambda/faq",
- "lambda/light-client",
- "lambda/custom-layers",
- {
- collapsed: false,
- type: "category",
- label: "Node.JS APIs",
- items: [
- "lambda/estimateprice",
- "lambda/deployfunction",
- "lambda/deletefunction",
- "lambda/getfunctioninfo",
- "lambda/getfunctions",
- "lambda/deletesite",
- "lambda/deploysite",
- "lambda/getawsclient",
- "lambda/getregions",
- "lambda/getsites",
- "lambda/downloadmedia",
- "lambda/getuserpolicy",
- "lambda/getrolepolicy",
- "lambda/getorcreatebucket",
- "lambda/getrenderprogress",
- "lambda/presignurl",
- "lambda/rendermediaonlambda",
- "lambda/renderstillonlambda",
- "lambda/simulatepermissions",
- ],
- },
- "lambda/checklist",
- {
- collapsed: false,
- type: "category",
- label: "Troubleshooting",
- items: [
- "lambda/troubleshooting/permissions",
- "lambda/troubleshooting/rate-limit",
- "lambda/troubleshooting/unrecognizedclientexception",
- "lambda/troubleshooting/bucket-disallows-acl",
- ],
- },
- "lambda/changelog",
- "lambda/upgrading",
- "lambda/uninstall",
- ],
- someSidebar: [
- {
- type: "category",
- label: "Getting started",
- items: [
- "getting-started",
- "the-fundamentals",
- "animating-properties",
- "reusability",
- "timeline",
- "render",
- ],
- },
- {
- type: "category",
- label: "Techniques",
- items: [
- "assets",
- "using-audio",
- "fonts",
- "using-randomness",
- "audio-visualization",
- "use-img-and-iframe",
- "javascript",
- "data-fetching",
- "encoding",
- "transparent-videos",
- "parametrized-rendering",
- "dynamic-metadata",
- "ssr",
- "webpack",
- "tailwind",
- "legacy-babel",
- "env-variables",
- "third-party",
- "stills",
- "scaling",
- "video-manipulation",
- "render-as-gif",
- ],
- },
- {
- type: "category",
- label: "CLI",
- link: {
- type: "doc",
- id: "cli/cli",
- },
- collapsed: true,
- items: [
- "cli/preview",
- "cli/render",
- "cli/still",
- "cli/compositions",
- {
- type: "link",
- href: "/docs/lambda/cli",
- label: "lambda ↗️",
- },
- "cli/versions",
- "cli/upgrade",
- "cli/help",
- ],
- },
- "config",
- {
- type: "category",
- label: "API - remotion",
- items: [
- "continue-render",
- "delay-render",
- "interpolate",
- "interpolate-colors",
- "get-input-props",
- "measure-spring",
- "random",
- "register-root",
- "spring",
- "staticfile",
- "use-current-frame",
- "use-video-config",
- "audio",
- "composition",
- "sequence",
- "loop",
- "video",
- "offthreadvideo",
- "absolute-fill",
- "img",
- "iframe",
- "freeze",
- "still",
- "series",
- "folder",
- "easing",
- ],
- },
- {
- type: "category",
- label: "API - @remotion/bundler",
- items: ["bundle"],
- },
- "gif",
- {
- type: "category",
- label: "API - @remotion/media-utils",
- items: [
- "audio-buffer-to-data-url",
- "get-audio-data",
- "get-audio-duration-in-seconds",
- "get-video-metadata",
- "get-waveform-portion",
- "use-audio-data",
- "visualize-audio",
- ],
- },
- {
- type: "link",
- href: "/docs/lambda",
- label: "API - @remotion/lambda",
- },
- {
- type: "category",
- link: {
- type: "doc",
- id: "player/player",
- },
- label: "API - @remotion/player",
- items: [
- "player/installation",
- "player/examples",
- "player/api",
- "player/scaling",
- "player/integration",
- "player/autoplay",
- "player/preloading",
- "player/best-practices",
- ],
- },
- {
- type: "category",
- label: "API - @remotion/three",
- link: {
- type: "doc",
- id: "three",
- },
- items: ["three-canvas", "use-video-texture"],
- },
- {
- type: "category",
- label: "API - @remotion/skia",
- link: {
- type: "doc",
- id: "skia/skia",
- },
- items: ["skia/enable-skia", "skia/skia-canvas"],
- },
- {
- type: "category",
- label: "API - @remotion/lottie",
- link: {
- type: "doc",
- id: "lottie/lottie-index",
- },
- items: [
- "lottie/lottie-comp",
- "lottie/getlottiemetadata",
- "lottie/lottie-staticfile",
- "lottie/lottie-remote",
- "lottie/lottie-aftereffects",
- "lottie/lottie-lottiefiles",
- ],
- },
- {
- type: "category",
- label: "API - @remotion/preload",
- link: {
- type: "doc",
- id: "preload/preload",
- },
- items: [
- "preload/preload-video",
- "preload/preload-audio",
- "preload/resolve-redirect",
- ],
- },
- {
- type: "category",
- link: {
- type: "doc",
- id: "renderer",
- },
- label: "API - @remotion/renderer",
- items: [
- "renderer/get-compositions",
- "renderer/render-media",
- "renderer/render-frames",
- "renderer/render-still",
- "renderer/stitch-frames-to-video",
- "renderer/open-browser",
- "renderer/make-cancel-signal",
- ],
- },
- {
- type: "category",
- label: "API - @remotion/paths",
- link: {
- type: "doc",
- id: "paths/index",
- },
- items: [
- "paths/get-length",
- "paths/get-parts",
- "paths/get-point-at-length",
- "paths/get-tangent-at-length",
- "paths/reverse-path",
- "paths/normalize-path",
- "paths/interpolate-path",
- "paths/evolve-path",
- ],
- },
- {
- type: "category",
- label: "Troubleshooting",
- items: [
- "timeout",
- "target-closed",
- "media-playback-error",
- "performance",
- "webpack-dynamic-imports",
- "non-seekable-media",
- "flickering",
- "version-mismatch",
- "enametoolong",
- "slow-method-to-extract-frame",
- "wrong-composition-mount",
- "staticfile-relative-paths",
- "staticfile-remote-urls",
- ],
- },
- {
- type: "category",
- label: "Miscellaneous",
- items: [
- "brownfield",
- "chromium-flags",
- "video-vs-offthreadvideo",
- "prereleases",
- "gpu",
- "react-18",
- "miscellaneous/typescript-aliases",
- "miscellaneous/render-all",
- "miscellaneous/render-in-browser",
- {
- type: "category",
- label: "Snippets",
- items: [
- "miscellaneous/snippets/player-in-iframe",
- "miscellaneous/snippets/fps-converter",
- "miscellaneous/snippets/adding-animations",
- ],
- },
- ],
- },
- "3-0-migration",
- "2-0-migration",
- "license",
- ],
+ lambdaSidebar: [
+ {
+ type: "link",
+ label: "← Back to main docs",
+ href: "/docs",
+ },
+ "lambda",
+ {
+ collapsed: false,
+ type: "category",
+ label: "CLI",
+ items: [
+ "lambda/cli",
+ "lambda/cli/sites",
+ "lambda/cli/functions",
+ "lambda/cli/render",
+ "lambda/cli/still",
+ "lambda/cli/policies",
+ "lambda/cli/regions",
+ "lambda/cli/quotas",
+ ],
+ },
+ "lambda/setup",
+ "lambda/permissions",
+ "lambda/region-selection",
+ "lambda/concurrency",
+ "lambda/runtime",
+ "lambda/disk-size",
+ "lambda/faq",
+ "lambda/light-client",
+ "lambda/custom-layers",
+ {
+ collapsed: false,
+ type: "category",
+ label: "Node.JS APIs",
+ items: [
+ "lambda/estimateprice",
+ "lambda/deployfunction",
+ "lambda/deletefunction",
+ "lambda/getfunctioninfo",
+ "lambda/getfunctions",
+ "lambda/deletesite",
+ "lambda/deploysite",
+ "lambda/getawsclient",
+ "lambda/getregions",
+ "lambda/getsites",
+ "lambda/downloadmedia",
+ "lambda/getuserpolicy",
+ "lambda/getrolepolicy",
+ "lambda/getorcreatebucket",
+ "lambda/getrenderprogress",
+ "lambda/presignurl",
+ "lambda/rendermediaonlambda",
+ "lambda/renderstillonlambda",
+ "lambda/simulatepermissions",
+ ],
+ },
+ "lambda/checklist",
+ {
+ collapsed: false,
+ type: "category",
+ label: "Troubleshooting",
+ items: [
+ "lambda/troubleshooting/permissions",
+ "lambda/troubleshooting/rate-limit",
+ "lambda/troubleshooting/unrecognizedclientexception",
+ "lambda/troubleshooting/bucket-disallows-acl",
+ ],
+ },
+ "lambda/changelog",
+ "lambda/upgrading",
+ "lambda/uninstall",
+ ],
+ someSidebar: [
+ {
+ type: "category",
+ label: "Getting started",
+ items: [
+ "getting-started",
+ "the-fundamentals",
+ "animating-properties",
+ "reusability",
+ "timeline",
+ "render",
+ ],
+ },
+ {
+ type: "category",
+ label: "Techniques",
+ items: [
+ "assets",
+ "using-audio",
+ "fonts",
+ "using-randomness",
+ "audio-visualization",
+ "use-img-and-iframe",
+ "javascript",
+ "data-fetching",
+ "encoding",
+ "transparent-videos",
+ "parametrized-rendering",
+ "dynamic-metadata",
+ "ssr",
+ "webpack",
+ "tailwind",
+ "legacy-babel",
+ "env-variables",
+ "third-party",
+ "stills",
+ "scaling",
+ "video-manipulation",
+ "render-as-gif",
+ ],
+ },
+ {
+ type: "category",
+ label: "CLI",
+ link: {
+ type: "doc",
+ id: "cli/cli",
+ },
+ collapsed: true,
+ items: [
+ "cli/preview",
+ "cli/render",
+ "cli/still",
+ "cli/compositions",
+ {
+ type: "link",
+ href: "/docs/lambda/cli",
+ label: "lambda ↗️",
+ },
+ "cli/versions",
+ "cli/upgrade",
+ "cli/help",
+ ],
+ },
+ "config",
+ {
+ type: "category",
+ label: "API - remotion",
+ items: [
+ "continue-render",
+ "delay-render",
+ "interpolate",
+ "interpolate-colors",
+ "get-input-props",
+ "measure-spring",
+ "random",
+ "register-root",
+ "spring",
+ "staticfile",
+ "use-current-frame",
+ "use-video-config",
+ "audio",
+ "composition",
+ "sequence",
+ "loop",
+ "video",
+ "offthreadvideo",
+ "absolute-fill",
+ "img",
+ "iframe",
+ "freeze",
+ "still",
+ "series",
+ "folder",
+ "easing",
+ ],
+ },
+ {
+ type: "category",
+ label: "API - @remotion/bundler",
+ items: ["bundle"],
+ },
+ "gif",
+ {
+ type: "category",
+ label: "API - @remotion/media-utils",
+ items: [
+ "audio-buffer-to-data-url",
+ "get-audio-data",
+ "get-audio-duration-in-seconds",
+ "get-video-metadata",
+ "get-waveform-portion",
+ "use-audio-data",
+ "visualize-audio",
+ ],
+ },
+ {
+ type: "link",
+ href: "/docs/lambda",
+ label: "API - @remotion/lambda",
+ },
+ {
+ type: "category",
+ link: {
+ type: "doc",
+ id: "player/player",
+ },
+ label: "API - @remotion/player",
+ items: [
+ "player/installation",
+ "player/examples",
+ "player/api",
+ "player/scaling",
+ "player/integration",
+ "player/autoplay",
+ "player/preloading",
+ "player/best-practices",
+ ],
+ },
+ {
+ type: "category",
+ label: "API - @remotion/three",
+ link: {
+ type: "doc",
+ id: "three",
+ },
+ items: ["three-canvas", "use-video-texture"],
+ },
+ {
+ type: "category",
+ label: "API - @remotion/skia",
+ link: {
+ type: "doc",
+ id: "skia/skia",
+ },
+ items: ["skia/enable-skia", "skia/skia-canvas"],
+ },
+ {
+ type: "category",
+ label: "API - @remotion/lottie",
+ link: {
+ type: "doc",
+ id: "lottie/lottie-index",
+ },
+ items: [
+ "lottie/lottie-comp",
+ "lottie/getlottiemetadata",
+ "lottie/lottie-staticfile",
+ "lottie/lottie-remote",
+ "lottie/lottie-aftereffects",
+ "lottie/lottie-lottiefiles",
+ ],
+ },
+ {
+ type: "category",
+ label: "API - @remotion/preload",
+ link: {
+ type: "doc",
+ id: "preload/preload",
+ },
+ items: [
+ "preload/preload-video",
+ "preload/preload-audio",
+ "preload/resolve-redirect",
+ ],
+ },
+ {
+ type: "category",
+ link: {
+ type: "doc",
+ id: "renderer",
+ },
+ label: "API - @remotion/renderer",
+ items: [
+ "renderer/get-compositions",
+ "renderer/render-media",
+ "renderer/render-frames",
+ "renderer/render-still",
+ "renderer/stitch-frames-to-video",
+ "renderer/open-browser",
+ "renderer/make-cancel-signal",
+ ],
+ },
+ {
+ type: "category",
+ label: "API - @remotion/paths",
+ link: {
+ type: "doc",
+ id: "paths/index",
+ },
+ items: [
+ "paths/get-length",
+ "paths/get-parts",
+ "paths/get-point-at-length",
+ "paths/get-tangent-at-length",
+ "paths/reverse-path",
+ "paths/normalize-path",
+ "paths/interpolate-path",
+ "paths/evolve-path",
+ ],
+ },
+ {
+ type: "category",
+ label: "Troubleshooting",
+ items: [
+ "timeout",
+ "target-closed",
+ "media-playback-error",
+ "performance",
+ "webpack-dynamic-imports",
+ "non-seekable-media",
+ "flickering",
+ "version-mismatch",
+ "enametoolong",
+ "slow-method-to-extract-frame",
+ "wrong-composition-mount",
+ "staticfile-relative-paths",
+ "staticfile-remote-urls",
+ ],
+ },
+ {
+ type: "category",
+ label: "Miscellaneous",
+ items: [
+ "brownfield",
+ "chromium-flags",
+ "video-vs-offthreadvideo",
+ "prereleases",
+ "gpu",
+ "react-18",
+ "miscellaneous/typescript-aliases",
+ "miscellaneous/render-all",
+ "miscellaneous/render-in-browser",
+ {
+ type: "category",
+ label: "Snippets",
+ items: [
+ "miscellaneous/snippets/player-in-iframe",
+ "miscellaneous/snippets/fps-converter",
+ "miscellaneous/snippets/adding-animations",
+ ],
+ },
+ ],
+ },
+ "3-0-migration",
+ "2-0-migration",
+ "license",
+ ],
};