🎥 Make videos programmatically with React
stub out media util docs
Jonny Burger61a173a2a65f
diff --git a/packages/docs/docs/get-audio-duration.md b/packages/docs/docs/get-audio-duration.mdnew file mode 100644index 0000000000..64b6532c6d--- /dev/null+++ b/packages/docs/docs/get-audio-duration.md@@ -0,0 +1,32 @@+---+title: getAudioDuration()+id: get-audio-duration+---++:::warning+This function is part of Remotion 2.0 which is not yet released. The information on this page might not yet accurately reflect the current state of Remotions API.+:::warning++_Part of the `@remotion/media-utils`_ package of helper functions.++Gets the duration in seconds of an audio source. Remotion will create an invisible `<audio>` tag, load the audio and return the duration.++## Arguments++### `src`++A string pointing to an audio asset++## Return value++`Promise<number>` - the duration of the audio file.++## Example++```tsx+import {getAudioDuration} from '@remotion/media-utils';+import music from './music.mp3';++await getAudioDuration(music); // 127.452+await getAudioDuration('https://example.com/remote-audio.aac'); // 50.24+```diff --git a/packages/docs/docs/get-audio-metadata.md b/packages/docs/docs/get-audio-metadata.mdnew file mode 100644index 0000000000..0e11addd62--- /dev/null+++ b/packages/docs/docs/get-audio-metadata.md@@ -0,0 +1,12 @@+---+title: getAudioData()+id: get-audio-data+---++:::warning+This function is part of Remotion 2.0 which is not yet released. The information on this page might not yet accurately reflect the current state of Remotions API.+:::warning++_Part of the `@remotion/media-utils`_ package of helper functions.++TODOdiff --git a/packages/docs/docs/get-waveform-portion.md b/packages/docs/docs/get-waveform-portion.mdnew file mode 100644index 0000000000..853e3fa497--- /dev/null+++ b/packages/docs/docs/get-waveform-portion.md@@ -0,0 +1,12 @@+---+title: getWaveformPortion()+id: get-waveform-portion+---++:::warning+This function is part of Remotion 2.0 which is not yet released. The information on this page might not yet accurately reflect the current state of Remotions API.+:::warning++_Part of the `@remotion/media-utils`_ package of helper functions.++TODOdiff --git a/packages/docs/docs/gif.md b/packages/docs/docs/gif.mdindex 257094544e..473f5abb90 100644--- a/packages/docs/docs/gif.md+++ b/packages/docs/docs/gif.md@@ -1,6 +1,6 @@---id: gif-sidebar_label: Reference - @remotion/gif+sidebar_label: API - @remotion/giftitle: "@remotion/gif"---diff --git a/packages/docs/docs/use-audio-data.md b/packages/docs/docs/use-audio-data.mdnew file mode 100644index 0000000000..f3baa6ccd2--- /dev/null+++ b/packages/docs/docs/use-audio-data.md@@ -0,0 +1,12 @@+---+title: useAudioData()+id: use-audio-data+---++:::warning+This function is part of Remotion 2.0 which is not yet released. The information on this page might not yet accurately reflect the current state of Remotions API.+:::warning++_Part of the `@remotion/media-utils`_ package of helper functions.++TODOdiff --git a/packages/docs/docs/visualize-audio.md b/packages/docs/docs/visualize-audio.mdnew file mode 100644index 0000000000..a128545c5b--- /dev/null+++ b/packages/docs/docs/visualize-audio.md@@ -0,0 +1,12 @@+---+title: visualizeAudio()+id: visualize-audio+---++:::warning+This function is part of Remotion 2.0 which is not yet released. The information on this page might not yet accurately reflect the current state of Remotions API.+:::warning++_Part of the `@remotion/media-utils`_ package of helper functions.++TODOdiff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 0d99dfca29..b90fe2491e 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -32,7 +32,7 @@ module.exports = {},{type: "category",- label: "Reference - Core API",+ label: "API - Core",items: ["cli","config",@@ -56,6 +56,17 @@ module.exports = {],},"gif",+ {+ type: "category",+ label: "API - @remotion/media-utils",+ items: [+ "get-audio-data",+ "get-audio-duration",+ "get-waveform-portion",+ "use-audio-data",+ "visualize-audio",+ ],+ },"license",],};diff --git a/packages/media-utils/src/get-audio-metadata.ts b/packages/media-utils/src/get-audio-data.tssimilarity index 100%rename from packages/media-utils/src/get-audio-metadata.tsrename to packages/media-utils/src/get-audio-data.tsdiff --git a/packages/media-utils/src/index.ts b/packages/media-utils/src/index.tsindex 3aa67405b1..5021eac2b8 100644--- a/packages/media-utils/src/index.ts+++ b/packages/media-utils/src/index.ts@@ -1,6 +1,5 @@+export {getAudioData} from './get-audio-data';export {getAudioDuration} from './get-audio-duration';-export {getAudioData} from './get-audio-metadata';-export {getWaveformSamples} from './get-wave-form-samples';export {getWaveformPortion} from './get-waveform-portion';export type {AudioData} from './types';export {useAudioData} from './use-audio-metadata';