🎥 Make videos programmatically with React
Formatting and Linting
evoxf1ea0bf4af10b0
diff --git a/packages/core/src/CompositionManager.tsx b/packages/core/src/CompositionManager.tsxindex fd348c7f61..8dd5ee5092 100644--- a/packages/core/src/CompositionManager.tsx+++ b/packages/core/src/CompositionManager.tsx@@ -124,14 +124,13 @@ export type TSequence = {loopDisplay: LoopDisplay | undefined;} & EnhancedTSequenceData;-type ToneFrequencyConstraints = {min: number;max: number;};const TONE_FREQUENCY_CONSTRAINTS: ToneFrequencyConstraints = {- min: 0, // Minimum allowed value for toneFrequency+ min: 0, // Minimum allowed value for toneFrequencymax: 1, // Maximum allowed value for toneFrequency};@@ -146,12 +145,17 @@ export type TRenderAsset = {allowAmplificationDuringRender: boolean;toneFrequency?: number | null;};-export const validateToneFrequency = (toneFrequency?: number | null): boolean => {+export const validateToneFrequency = (+ toneFrequency?: number | null,+): boolean => {if (toneFrequency === undefined || toneFrequency === null) {- return true; // toneFrequency is optional, so it's valid if undefined or null+ return true; // toneFrequency is optional, so it's valid if undefined or null}-- return toneFrequency >= TONE_FREQUENCY_CONSTRAINTS.min && toneFrequency <= TONE_FREQUENCY_CONSTRAINTS.max;++ return (+ toneFrequency >= TONE_FREQUENCY_CONSTRAINTS.min &&+ toneFrequency <= TONE_FREQUENCY_CONSTRAINTS.max+ );};export const compositionsRef = React.createRef<{diff --git a/packages/core/src/audio/AudioForRendering.tsx b/packages/core/src/audio/AudioForRendering.tsxindex 94eed32f48..ff18dba9b5 100644--- a/packages/core/src/audio/AudioForRendering.tsx+++ b/packages/core/src/audio/AudioForRendering.tsx@@ -97,7 +97,7 @@ const AudioForRenderingRefForwardingFunction: React.ForwardRefRenderFunction<mediaFrame: frame,playbackRate: props.playbackRate ?? 1,allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,- toneFrequency: null+ toneFrequency: null,});return () => unregisterRenderAsset(id);}, [diff --git a/packages/core/src/video/VideoForRendering.tsx b/packages/core/src/video/VideoForRendering.tsxindex b709b0d99b..257c76b65c 100644--- a/packages/core/src/video/VideoForRendering.tsx+++ b/packages/core/src/video/VideoForRendering.tsx@@ -1,4 +1,3 @@-import type {ForwardRefExoticComponent, RefAttributes} from 'react';import React, {forwardRef,diff --git a/packages/docs/docs/audio.md b/packages/docs/docs/audio.mdindex bdff61c303..991f1cb244 100644--- a/packages/docs/docs/audio.md+++ b/packages/docs/docs/audio.md@@ -125,7 +125,8 @@ export const MyVideo = () => {};```-### `toneFrequency`<AvailableFrom v="4.0.45"/>+### `toneFrequency`<AvailableFrom v="4.0.45"/>+//update the versionThe `toneFrequency` prop allows you to adjust the pitch of the audio. It accepts a number between 0 and 1, where 0 represents the lowest pitch and 1 represents the highest pitch. For example, a toneFrequency of 0.5 would lower the pitch by half. The valid range for toneFrequency is from 0 (lowest pitch) to 1 (highest pitch).@@ -147,7 +148,7 @@ In the [Remotion Studio](/docs/terminology#remotion-studio) or in the [Remotion## `allowAmplificationDuringRender`<AvailableFrom v="3.3.17"/>-Make values for [`volume`](#volume) greater than `1` result in amplification during renders.+Make values for [`volume`](#volume) greater than `1` result in amplification during renders.In the Remotion Studio, the volume will be limited to `1`, since the browser cannot amplify audio.## See also@@ -156,3 +157,4 @@ In the Remotion Studio, the volume will be limited to `1`, since the browser can- [Using audio](/docs/using-audio)- [Audio visualization](/docs/audio-visualization)- [`<Video />`](/docs/video)+```