🎥 Make videos programmatically with React
TL;DR
Jonny Burger007490c1ddaf
diff --git a/packages/docs/docs/player/buffer-state.mdx b/packages/docs/docs/player/buffer-state.mdxindex 7873a16fe1..a5a89f939c 100644--- a/packages/docs/docs/player/buffer-state.mdx+++ b/packages/docs/docs/player/buffer-state.mdx@@ -12,6 +12,11 @@ In this case, the best practice is to briefly pause the video, let the content lRemotion has a native buffer state, which can be used to pause the video when the buffer is empty.+## TL;DR++You can add a `pauseWhenBuffering` prop to your [`<Video>`](/docs/video/#pausewhenbuffering), [`<OffthreadVideo>`](/docs/offthreadvideo/#pausewhenbuffering), [`<Audio>`](/docs/audio/#pausewhenbuffering) and [`<Img>`](/docs/img/#pausewhenbuffering) tags.+By doing so, the Player will briefly pause until your media is loaded.+## Mechanic### Activating the buffer state@@ -347,3 +352,9 @@ const MyApp: React.FC = () => {In Remotion 4.0, media tags such as `<Audio>`, `<OffthreadVideo>` tags will need to opt-in to use the buffer state.In Remotion 5.0, it is planned that `<Audio>`, `<Video>` and `<OffthreadVideo>` will automatically use the buffer state, but they can opt out of it.++## See also++- [`useBufferState()`](/docs/use-buffer-state)+- [`<Player>`](/docs/player/player)+- [Avoiding flickering in `<Player>`](/docs/troubleshooting/player-flicker)diff --git a/packages/docs/docs/troubleshooting/video-flicker.md b/packages/docs/docs/troubleshooting/video-flicker.mdindex 59c7c427fa..64811d1c49 100644--- a/packages/docs/docs/troubleshooting/video-flicker.md+++ b/packages/docs/docs/troubleshooting/video-flicker.md@@ -37,7 +37,7 @@ This effect is only happening in the Remotion Studio and the Remotion Player, an<strong><Step>2</Step>Option 2: Pause the <code>{"<Player/>"}</code> when media is buffering</strong><br/>-You may want to pause the `<Player>` temporarily to allow loading of the assets and resume once the assets are ready for playback. [See here](/docs/player/buffer-state) for how to implement this.+You may want to pause the `<Player>` temporarily to allow loading of the assets and resume once the assets are ready for playback.<br/> You can do so by adding a `pauseWhenBuffering` prop to your [`<Video>`](/docs/video/#pausewhenbuffering), [`<OffthreadVideo>`](/docs/offthreadvideo/#pausewhenbuffering), [`<Audio>`](/docs/audio/#pausewhenbuffering) and [`<Img>`](/docs/img/#pausewhenbuffering) tags. [See here](/docs/player/buffer-state) for how to implement this.<strong><Step>3</Step>Option 3: Preloading to avoid network request</strong><br/>