Skip to content

🎥 Make videos programmatically with React

update docs and make it make sense

Jonny Burgerfc7e5d241e13
diff --git a/packages/docs/docs/get-waveform-portion.mdx b/packages/docs/docs/get-waveform-portion.mdx
index 336b8c54cc..2c20d524b2 100644
--- a/packages/docs/docs/get-waveform-portion.mdx
+++ b/packages/docs/docs/get-waveform-portion.mdx
@@ -49,6 +49,16 @@ _number_
The range of the output values. Either `minus-one-to-one` or `zero-to-one`. Defaults to `zero-to-one`.
+### `normalize?`<AvailableFrom v="4.0.280" />
+
+_boolean_
+
+Default `true`. If set to `true`, then the data gets scaled so that the biggest value is `1`.
+
+:::note
+From v4.0.267 to v4.0.279, `normalize` was mistakenly changed to `false`. We have restored the original behavior from v4.0.280.
+:::
+
## Return value
`Bar[]` - An array of objects with the following properties:
diff --git a/packages/docs/docs/media-utils/visualize-audio-waveform.mdx b/packages/docs/docs/media-utils/visualize-audio-waveform.mdx
index 2b84d57f82..0cad5dea3a 100644
--- a/packages/docs/docs/media-utils/visualize-audio-waveform.mdx
+++ b/packages/docs/docs/media-utils/visualize-audio-waveform.mdx
@@ -73,6 +73,12 @@ Example: Your video has an `fps` of 30, and you pass 15 as the `frame` on `visua
The amount of seconds the audio is offset, pass this parameter if you are using [`useWindowedAudioData()`](/docs/use-windowed-audio-data).
+### `normalize?`<AvailableFrom v="4.0.280" />
+
+_boolean_
+
+Default `false`. If set to `true`, then the wave data gets scaled so that the biggest value is `1`.
+
## Return value
`number[]`
diff --git a/packages/media-utils/src/visualize-audio-waveform.ts b/packages/media-utils/src/visualize-audio-waveform.ts
index 5e5748173e..a8c857bdbf 100644
--- a/packages/media-utils/src/visualize-audio-waveform.ts
+++ b/packages/media-utils/src/visualize-audio-waveform.ts
@@ -23,7 +23,7 @@ const visualizeAudioWaveformFrame = ({
windowInSeconds,
channel,
dataOffsetInSeconds,
- normalize = true,
+ normalize = false,
}: VisualizeAudioWaveformOptions) => {
if (windowInSeconds * audioData.sampleRate < numberOfSamples) {
throw new TypeError(