Skip to content

🎥 Make videos programmatically with React

update with staticFile example

Jonny Burger69ce94f68530
diff --git a/packages/docs/docs/get-audio-data.md b/packages/docs/docs/get-audio-data.md
index 0a2963221b..f3f9f80f70 100644
--- a/packages/docs/docs/get-audio-data.md
+++ b/packages/docs/docs/get-audio-data.md
@@ -29,7 +29,7 @@ A string pointing to an audio asset.
```ts twoslash
// @module: ESNext
// @target: ESNext
-import { Audio } from "remotion";
+import { Audio, staticFile } from "remotion";
// ---cut---
import { getAudioData } from "@remotion/media-utils";
import music from "./music.mp3";
@@ -50,6 +50,14 @@ await getAudioData("https://example.com/remote-audio.aac"); /* {
resultId: "0.432324444",
isRemote: true
} */
+await getAudioData(staticFile("my-file.wav")); /* {
+ channelWaveforms: [Float32Array(4800000)],
+ sampleRate: 48000,
+ durationInSeconds: 100.0000,
+ numberOfChannels: 1,
+ resultId: "0.6891332223",
+ isRemote: false
+} */
```
## Caching behavior