🎥 Make videos programmatically with React
update links
Jonny Burger4f80f3987b24
diff --git a/packages/docs/blog/2021-10-26-remotion-2-5.md b/packages/docs/blog/2021-10-26-remotion-2-5.mdindex d8d299b17d..36b55eafba 100644--- a/packages/docs/blog/2021-10-26-remotion-2-5.md+++ b/packages/docs/blog/2021-10-26-remotion-2-5.md@@ -32,7 +32,7 @@ _Thanks to [Brian Pederson](https://github.com/remotion-dev/remotion/pull/638) fYou can now change the playback rate in the editor and play a video in slow-motion, in fast-forward, and even in reverse! We support speeds between -4x and 4x. This makes debugging animations that don’t look clean much easier.-It also works in the `<Player />`! See the new [`playbackRate`](/docs/player/api#playbackrate) prop and we also added a [`ratechange`](/docs/player/api#ratechange) event - just like the native HTML5 Video element.+It also works in the `<Player />`! See the new [`playbackRate`](/docs/player/player#playbackrate) prop and we also added a [`ratechange`](/docs/player/player#ratechange) event - just like the native HTML5 Video element.<img src="/img/playbackrate.gif" />diff --git a/packages/docs/blog/2022-01-05-remotion-2-6.md b/packages/docs/blog/2022-01-05-remotion-2-6.mdindex e4ae639253..49380526c6 100644--- a/packages/docs/blog/2022-01-05-remotion-2-6.md+++ b/packages/docs/blog/2022-01-05-remotion-2-6.md@@ -23,7 +23,7 @@ You can dynamically update the props of the video at runtime, which creates an eOn mobile, restrictive policies prevent auto-play of audio content. [We help you](/docs/player/autoplay) architect your player so it can play audio in as many cases as possible while still respecting the browser policies. This includes the option to mount silent audio tags, activate them while the user interacts with the page and use them later to play audio.-In this release, we added a new [`renderLoading`](/docs/player/api#renderloading) prop and wrote docs for how to [scale your player](/docs/player/scaling), [code-sharing between Remotion and Create React App/Next.JS](/docs/player/integration) and [preloading assets](/docs/player/preloading).+In this release, we added a new [`renderLoading`](/docs/player/player#renderloading) prop and wrote docs for how to [scale your player](/docs/player/scaling), [code-sharing between Remotion and Create React App/Next.JS](/docs/player/integration) and [preloading assets](/docs/player/preloading).[See the landing page for `@remotion/player`](/player)[Demo and Documentation](/docs/player)diff --git a/packages/docs/blog/2022-08-10-remotion-3-2.md b/packages/docs/blog/2022-08-10-remotion-3-2.mdindex 3bfc52a7ed..7d39e200ab 100644--- a/packages/docs/blog/2022-08-10-remotion-3-2.md+++ b/packages/docs/blog/2022-08-10-remotion-3-2.md@@ -123,9 +123,9 @@ Renders that are only video are now faster because no assets need to be download- Remotion Lambda now has a [`privacy: "no-acl"`](/docs/lambda/rendermediaonlambda#privacy) option if you are rendering into a bucket that has the ACL feature disabled.- Remotion Lambda now supports a [`downloadBehavior`](/docs/lambda/rendermediaonlambda#downloadbehavior) prop which makes it that when a output file link gets clicked in the browser, it will download instead of play in the browser.- Adding an output filename to the [`npx remotion render`](/docs/cli/render) command is not necessary anymore, it will default to `out/{composition-id}.{extension}` now.-- The `<Player>` has a new [`moveToBeginningWhenEnded`](/docs/player/api#movetobeginningwhenended) prop that determines if the player moves back to the beginning when the video has reached the end and is not looping.-- The `<Player>` has a new [`fullscreenchange`](/docs/player/api#fullscreenchange) event that allows you to-- You can now assign a `className` to the [`<Player>`](/docs/player/api).+- The `<Player>` has a new [`moveToBeginningWhenEnded`](/docs/player/player#movetobeginningwhenended) prop that determines if the player moves back to the beginning when the video has reached the end and is not looping.+- The `<Player>` has a new [`fullscreenchange`](/docs/player/player#fullscreenchange) event that allows you to+- You can now assign a `className` to the [`<Player>`](/docs/player/player).## Developer experiencediff --git a/packages/docs/docs/player/autoplay.md b/packages/docs/docs/player/autoplay.mdindex 7d192f8bc2..edf3fa5286 100644--- a/packages/docs/docs/player/autoplay.md+++ b/packages/docs/docs/player/autoplay.md@@ -9,7 +9,7 @@ Browsers place restrictions on websites that play audio without user interaction## Trigger the play from a user event-Don't autoplay audio on site load, or else browsers will block the audio. Instead, display a play button or use the [`controls`](/docs/player/api#controls) prop.+Don't autoplay audio on site load, or else browsers will block the audio. Instead, display a play button or use the [`controls`](/docs/player/player#controls) prop.## Pass the event to the `play()` or `toggle()` method@@ -22,8 +22,8 @@ export const MyComp = () => <></>;// @filename: index.tsx// ---cut---+import { PlayerRef } from "@remotion/player";import { useRef } from "react";-import { Player, PlayerRef } from "@remotion/player";export const App: React.FC = () => {const ref = useRef<PlayerRef>(null);@@ -45,7 +45,7 @@ export const App: React.FC = () => {## Use the `numberOfSharedAudioTags` property-If your audio does not enter the video immediately (say the few seconds of the video are silent, but then the audio fades in), it technically doesn't start based on an user integration. To combat this issue, you can use the [`numberOfSharedAudioTags`](/docs/player/api#numberofsharedaudiotags) property. This will play some silent audio on the first play with user interaction, and then reuse that tag to play your deferred audio playback.+If your audio does not enter the video immediately (say the few seconds of the video are silent, but then the audio fades in), it technically doesn't start based on an user integration. To combat this issue, you can use the [`numberOfSharedAudioTags`](/docs/player/player#numberofsharedaudiotags) property. This will play some silent audio on the first play with user interaction, and then reuse that tag to play your deferred audio playback.You can have as many silent audio tags as you want. Set `numberOfSharedAudioTags={2}` to prepare two shared audio tags. Be mindful: If you set this props and you render more [`<Audio/>`](/docs/audio) than there are shared audio tags, an exception will be thrown.diff --git a/packages/docs/docs/player/best-practices.md b/packages/docs/docs/player/best-practices.mdindex 22780c5f08..99b0c1fae3 100644--- a/packages/docs/docs/player/best-practices.md+++ b/packages/docs/docs/player/best-practices.md@@ -105,7 +105,7 @@ This advice is mainly for frequently updated state like the current time. Keepin## Pass the user interaction event to `play()`When you listen to an `onClick()` event, the browser will give you an `event` argument.-Pass it on to [`.play()`](/docs/player/api#play) and [`.toggle()`](/docs/player/api#toggle) to have the lowest chance of hitting autoplay restrictions that the browser may impose.+Pass it on to [`.play()`](/docs/player/player#play) and [`.toggle()`](/docs/player/player#toggle) to have the lowest chance of hitting autoplay restrictions that the browser may impose.[Read here for more details.](/docs/player/autoplay#pass-the-event-to-the-play-or-toggle-method)diff --git a/packages/docs/docs/player/index.md b/packages/docs/docs/player/index.mdindex c08171fab7..8f78e6f4f1 100644--- a/packages/docs/docs/player/index.md+++ b/packages/docs/docs/player/index.md@@ -14,4 +14,4 @@ Play the video, then tweak the parameters below the video.## See also- [Installation](/docs/player/installation)-- [API](/docs/player/api)+- [API](/docs/player/player)diff --git a/packages/docs/docs/player/installation.md b/packages/docs/docs/player/installation.mdindex 2de6efd839..9f8975be8f 100644--- a/packages/docs/docs/player/installation.md+++ b/packages/docs/docs/player/installation.md@@ -48,4 +48,4 @@ Also update **all the other Remotion packages** to have the same version: `remotMake sure no package version number has a `^` character in front of it as it can lead to a version conflict.:::-Read the [examples](/docs/player/examples) and [API reference](/docs/player/api) next.+Read the [examples](/docs/player/examples) and [API reference](/docs/player/player) next.diff --git a/packages/docs/docs/player/thumbnail.md b/packages/docs/docs/player/thumbnail.mdindex 449fe0514f..dc9fba68df 100644--- a/packages/docs/docs/player/thumbnail.md+++ b/packages/docs/docs/player/thumbnail.md@@ -271,7 +271,7 @@ ref.current?.addEventListener("error", (e) => {## Handling errors-See: [`<Player>` -> Handling errors](/docs/player/api#handling-errors)+See: [`<Player>` -> Handling errors](/docs/player/player#handling-errors)## See alsodiff --git a/packages/docs/docs/terminology.md b/packages/docs/docs/terminology.mdindex e68b210a96..18f23b9bc7 100644--- a/packages/docs/docs/terminology.md+++ b/packages/docs/docs/terminology.md@@ -46,7 +46,7 @@ The Remotion Root is the directory in which Remotion commands get executed in. IThe entry point is the file where the Remotion CLI and Node.JS APIs will look for a Remotion project. By default in most templates, it is `src/index.tsx`. The entry point can be passed to the render command, for example: `npx remotion render src/index.tsx`. The entry point should call [`registerRoot()`](/docs/register-root).-In the [Remotion Player](#remotion-player), there is no concept of an entry point. You directly pass a React component and metadata to the [`<Player>`](/docs/player/api).+In the [Remotion Player](#remotion-player), there is no concept of an entry point. You directly pass a React component and metadata to the [`<Player>`](/docs/player/player).## Remotion Preview@@ -73,4 +73,4 @@ Input props are data that can be passed to a render in order to parametrize theIn the [Remotion Preview](#remotion-preview), you can set [default props](/docs/composition#defaultprops) to serve as placeholder data for desigining your video. If your input props don't override the default props, the default props will be used.-In the [Remotion Player](#remotion-player), there are no default props, but you can pass [`inputProps`](/docs/player/api#inputprops) directly to the [`<Player>`](/docs/player).+In the [Remotion Player](#remotion-player), there are no default props, but you can pass [`inputProps`](/docs/player/player#inputprops) directly to the [`<Player>`](/docs/player).diff --git a/packages/docs/docs/wrong-composition-mount.md b/packages/docs/docs/wrong-composition-mount.mdindex ccf163b915..f95c422a3c 100644--- a/packages/docs/docs/wrong-composition-mount.md+++ b/packages/docs/docs/wrong-composition-mount.md@@ -73,8 +73,8 @@ To fix it, you must remove the nested compositions.The cause for the error is that in the component you passed in to the `component` prop of Remotion Player, you are returning a `<Composition>`.```tsx twoslash title="❌"-import { Composition } from "remotion";import { Player } from "@remotion/player";+import { Composition } from "remotion";const AnotherComp: React.FC = () => {return null;@@ -112,10 +112,9 @@ const Index: React.FC = () => {There is no use for compositions in `<Player>`. Only use them during rendering and when using the Remotion Preview.:::-To fix it, pass the component directly to the player's [`component`](/docs/player/api#component) prop and provide the [`durationInFrames`](/docs/player/api#durationinframes), [`fps`](/docs/player/api#fps), [`compositionHeight`](/docs/player/api#compositionheight) and [`compositionWidth`](/docs/player/api#compositionwidth) props to the player.+To fix it, pass the component directly to the player's [`component`](/docs/player/player#component) prop and provide the [`durationInFrames`](/docs/player/player#durationinframes), [`fps`](/docs/player/player#fps), [`compositionHeight`](/docs/player/player#compositionheight) and [`compositionWidth`](/docs/player/player#compositionwidth) props to the player.```tsx twoslash title="✅"-import { Composition } from "remotion";import { Player } from "@remotion/player";const AnotherComp: React.FC = () => {diff --git a/packages/player/README.md b/packages/player/README.mdindex ecc564ded7..524bc63e9f 100644--- a/packages/player/README.md+++ b/packages/player/README.md@@ -83,4 +83,4 @@ The most important props accepted:| compositionWidth | The width of the composition in pixels || fps | The frame rate of the video |-For a complete reference of the available props, refer to [@remotion/player API](https://www.remotion.dev/docs/player/api).+For a complete reference of the available props, refer to [@remotion/player API](https://www.remotion.dev/docs/player/player).