Skip to content

🎥 Make videos programmatically with React

add docs

Jonny Burger8c16a134f81d
diff --git a/packages/docs/docs/audio.md b/packages/docs/docs/audio.md
index b880513d40..cbd848cf7e 100644
--- a/packages/docs/docs/audio.md
+++ b/packages/docs/docs/audio.md
@@ -35,6 +35,18 @@ export const MyVideo = () => {
}
```
+## Controlling volume
+
+You can use the `volume` prop to control the loudness of the audio. See [Controlling audio](/docs/using-audio#controlling-volume) for more information.
+
+## Controlling playback speed
+
+_Available from v2.2_
+
+You can use the `playbackRate` prop to control the speed of the audio. `1` is the default and means regular speed, `0.5` slows down the audio so it's twice as long and `2` speeds up the audio so it's twice as fast.
+
+While Remotion doesn't limit the range of possible playback speeds, in development mode the [`HTMLMediaElement.playbackRate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate) API is used which throws errors on extreme values. At the time of writing, Google Chrome throws an exception if the playback rate is below `0.0625` or above `16`.
+
## See also
- [Using audio](/docs/audio)
diff --git a/packages/docs/docs/using-audio.md b/packages/docs/docs/using-audio.md
index c0858931f6..48ebce9404 100644
--- a/packages/docs/docs/using-audio.md
+++ b/packages/docs/docs/using-audio.md
@@ -156,6 +156,14 @@ export const MyVideo = () => {
Audio from [`<Video />`](/docs/video) tags are also included in the output. You may also use the `volume` and `muted` props in the same way.
+## Controlling playback speed
+
+_Available from v2.2_
+
+You can use the `playbackRate` prop to control the speed of the audio. `1` is the default and means regular speed, `0.5` slows down the audio so it's twice as long and `2` speeds up the audio so it's twice as fast.
+
+While Remotion doesn't limit the range of possible playback speeds, in development mode the [`HTMLMediaElement.playbackRate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate) API is used which throws errors on extreme values. At the time of writing, Google Chrome throws an exception if the playback rate is below `0.0625` or above `16`.
+
## Audio visualization
You can obtain audio data and create visualizations based on it. See the page [Audio visualization](/docs/audio-visualization) for more info.
diff --git a/packages/docs/docs/video.md b/packages/docs/docs/video.md
index 00c4ed84fa..ac2434737f 100644
--- a/packages/docs/docs/video.md
+++ b/packages/docs/docs/video.md
@@ -43,6 +43,18 @@ Prior to Remotion 1.5, Remotion will always use an internal Puppeteer binary and
If you would like Remotion to warn you when you import an MP4 video, you can turn on the `@remotion/no-mp4-import` ESLint rule.
+## Controlling volume
+
+You can use the `volume` prop to control the loudness of the audio coming from the video. See [Controlling audio](/docs/using-audio#controlling-volume) for more information.
+
+## Controlling playback speed
+
+_Available from v2.2_
+
+You can use the `playbackRate` prop to control the speed of the video. `1` is the default and means regular speed, `0.5` slows down the video so it's twice as long and `2` speeds up the video so it's twice as fast.
+
+While Remotion doesn't limit the range of possible playback speeds, in development mode the [`HTMLMediaElement.playbackRate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate) API is used which throws errors on extreme values. At the time of writing, Google Chrome throws an exception if the playback rate is below `0.0625` or above `16`.
+
## See also
- [`<Audio />`](/docs/audio)