🎥 Make videos programmatically with React
Docs: Note that volume callbacks remain supported
Jonny Burger877d36fe591c
diff --git a/packages/docs/docs/html5-audio.mdx b/packages/docs/docs/html5-audio.mdxindex a34c29c4be..a5509c11ab 100644--- a/packages/docs/docs/html5-audio.mdx+++ b/packages/docs/docs/html5-audio.mdx@@ -41,6 +41,8 @@ Selects this many source frames starting at `trimBefore`. The audio occupies `duAllows you to control the volume of the audio in it's entirety or frame by frame. Read the page on [using audio](/docs/using-audio) to learn more.+The `volume` prop also accepts a `(frame: number) => number` callback, but this is no longer recommended. Use [`useCurrentFrame()`](/docs/use-current-frame) and [`interpolate()`](/docs/interpolate) to calculate a numeric volume instead.+```tsx twoslash title="Setting a static volume"import {Html5Audio, staticFile} from 'remotion';diff --git a/packages/docs/docs/html5-video.mdx b/packages/docs/docs/html5-video.mdxindex 194ca383b9..c25592e169 100644--- a/packages/docs/docs/html5-video.mdx+++ b/packages/docs/docs/html5-video.mdx@@ -126,6 +126,8 @@ export const MyComposition = () => {Allows you to control the volume for the whole track or change it on a per-frame basis. Refer to the [using audio](/docs/audio/volume) guide to learn how to use it.+The `volume` prop also accepts a `(frame: number) => number` callback, but this is no longer recommended. Use [`useCurrentFrame()`](/docs/use-current-frame) and [`interpolate()`](/docs/interpolate) to calculate a numeric volume instead.+```tsx twoslash title="Example using static volume"import {staticFile, Html5Video} from 'remotion';diff --git a/packages/docs/docs/media/audio.mdx b/packages/docs/docs/media/audio.mdxindex 5b64700a32..ff4f194d45 100644--- a/packages/docs/docs/media/audio.mdx+++ b/packages/docs/docs/media/audio.mdx@@ -116,6 +116,8 @@ Removes a portion of the audio at the end (right side). If `durationInFrames` enAllows you to control the volume of the audio in it's entirety or frame by frame.Read the page on [using audio](/docs/using-audio) to learn more.+The `volume` prop also accepts a `(frame: number) => number` callback, but this is no longer recommended. Use [`useCurrentFrame()`](/docs/use-current-frame) and [`interpolate()`](/docs/interpolate) to calculate a numeric volume instead.+```tsx twoslash title="Setting a static volume"import {staticFile} from 'remotion';import {Audio} from '@remotion/media';diff --git a/packages/docs/docs/media/video.mdx b/packages/docs/docs/media/video.mdxindex 712da35ee1..0b03d9044f 100644--- a/packages/docs/docs/media/video.mdx+++ b/packages/docs/docs/media/video.mdx@@ -164,6 +164,8 @@ Removes a portion of the video at the end (right side). If `durationInFrames` enAllows you to control the volume of the audio in it's entirety or frame by frame.Read the page on [using audio](/docs/using-audio) to learn more.+The `volume` prop also accepts a `(frame: number) => number` callback, but this is no longer recommended. Use [`useCurrentFrame()`](/docs/use-current-frame) and [`interpolate()`](/docs/interpolate) to calculate a numeric volume instead.+```tsx twoslash title="Setting a static volume"import {staticFile} from 'remotion';import {Video} from '@remotion/media';diff --git a/packages/docs/docs/offthreadvideo.mdx b/packages/docs/docs/offthreadvideo.mdxindex c00a686ff6..d4986b2272 100644--- a/packages/docs/docs/offthreadvideo.mdx+++ b/packages/docs/docs/offthreadvideo.mdx@@ -111,6 +111,8 @@ If set to `false` (_default_), frames will be extracted as bitmap (BMP), which iAllows you to control the volume for the whole track or change it on a per-frame basis. Refer to the [using audio](/docs/audio/volume) guide to learn how to use it.+The `volume` prop also accepts a `(frame: number) => number` callback, but this is no longer recommended. Use [`useCurrentFrame()`](/docs/use-current-frame) and [`interpolate()`](/docs/interpolate) to calculate a numeric volume instead.+```tsx twoslash title="Example using static volume"import {OffthreadVideo, staticFile} from 'remotion';