Skip to content

🎥 Make videos programmatically with React

`@remotion/media`: Remove "experimental" prefix

JonnyBurger0f57fa7d82ab
diff --git a/packages/docs/docs/media/audio.mdx b/packages/docs/docs/media/audio.mdx
index 4a7c433d02..8b2b578469 100644
--- a/packages/docs/docs/media/audio.mdx
+++ b/packages/docs/docs/media/audio.mdx
@@ -22,7 +22,7 @@ This component imports and displays a video, similar to [`<Audio />`](/docs/audi
```tsx twoslash
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
export const MyVideo = () => {
return (
@@ -37,7 +37,7 @@ You can load a video from an URL as well:
```tsx twoslash
import {AbsoluteFill} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
return (
@@ -69,7 +69,7 @@ For exact behavior, see: [Order of operations](/docs/audio/order-of-operations).
```tsx twoslash
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -92,7 +92,7 @@ Read the page on [using audio](/docs/using-audio) to learn more.
```tsx twoslash title="Setting a static volume"
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
export const MyVideo = () => {
return (
@@ -105,7 +105,7 @@ export const MyVideo = () => {
```tsx twoslash title="Changing the volume over time"
import {AbsoluteFill, interpolate, staticFile} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
export const MyVideo = () => {
return (
@@ -130,7 +130,7 @@ Controls the speed of the audio. `1` is the default and means regular speed, `0.
```tsx twoslash title="Example of a audio playing twice as fast"
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -151,7 +151,7 @@ Playing a audio in reverse is not supported.
Makes the audio loop indefinitely.
```tsx twoslash title="Example of a looped audio"
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -170,7 +170,7 @@ Can be either `"repeat"` (default, start from 0 on each iteration) or `"extend"`
The `muted` prop will be respected. It will lead to no audio being played while still keeping the audio tag mounted. It's value may change over time, for example to only mute a certain section of the audio.
```tsx twoslash title="Example of a muted video"
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
return <Audio muted src="https://remotion.media/audio.wav" />;
@@ -199,7 +199,7 @@ Select the audio stream to use. The default is `0`.
```tsx twoslash
import {AbsoluteFill} from 'remotion';
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
diff --git a/packages/docs/docs/media/fallback.mdx b/packages/docs/docs/media/fallback.mdx
index fd030bede3..63dd1d1ec7 100644
--- a/packages/docs/docs/media/fallback.mdx
+++ b/packages/docs/docs/media/fallback.mdx
@@ -31,7 +31,7 @@ If you are rendering on an environment where the logs are not immediately visibl
To prevent [`<Video>`](/docs/media/video) from falling back to [`<OffthreadVideo>`](/docs/offthreadvideo), set the [`disallowFallbackToOffthreadVideo`](/docs/media/video#disallowfallbacktooffthreadvideo) prop:
```tsx twoslash title="No fallback to OffthreadVideo"
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
export const MyComp: React.FC = () => {
return <Video src="https://remotion.media/video.mp4" disallowFallbackToOffthreadVideo />;
@@ -41,7 +41,7 @@ export const MyComp: React.FC = () => {
To prevent [`<Audio>`](/docs/media/audio) from falling back to [`<Audio>`](/docs/audio) from [`remotion`](/docs/remotion), set the [`disallowFallbackToHtml5Audio`](/docs/media/audio#disallowfallbacktohtml5audio) prop:
```tsx twoslash title="No fallback to HTML5 audio tag"
-import {experimental_Audio as Audio} from '@remotion/media';
+import {Audio} from '@remotion/media';
export const MyComp: React.FC = () => {
return <Audio src="https://remotion.media/audio.mp3" disallowFallbackToHtml5Audio />;
diff --git a/packages/docs/docs/media/video.mdx b/packages/docs/docs/media/video.mdx
index ecddb65880..45daf7e3b3 100644
--- a/packages/docs/docs/media/video.mdx
+++ b/packages/docs/docs/media/video.mdx
@@ -24,7 +24,7 @@ This component has [native buffering support](/docs/player/buffer-state) enabled
```tsx twoslash
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
export const MyVideo = () => {
return (
@@ -39,7 +39,7 @@ You can load a video from an URL as well:
```tsx twoslash
import {AbsoluteFill} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
return (
@@ -71,7 +71,7 @@ For exact behavior, see: [Order of operations](/docs/audio/order-of-operations).
```tsx twoslash
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -94,7 +94,7 @@ Read the page on [using audio](/docs/using-audio) to learn more.
```tsx twoslash title="Setting a static volume"
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
export const MyVideo = () => {
return (
@@ -107,7 +107,7 @@ export const MyVideo = () => {
```tsx twoslash title="Changing the volume over time"
import {AbsoluteFill, interpolate, staticFile} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
export const MyVideo = () => {
return (
@@ -132,7 +132,7 @@ Controls the speed of the video. `1` is the default and means regular speed, `0.
```tsx twoslash title="Example of a video playing twice as fast"
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -154,7 +154,7 @@ You can drop the audio of the video by adding a `muted` prop:
```tsx twoslash title="Example of a muted video"
import {AbsoluteFill, OffthreadVideo} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
return (
@@ -171,7 +171,7 @@ You can pass any style you can pass to a native HTML `<canvas>` element.
```tsx twoslash
import {AbsoluteFill, staticFile} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -189,7 +189,7 @@ Makes the video loop indefinitely.
```tsx twoslash title="Example of a looped video"
import {AbsoluteFill} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
@@ -231,7 +231,7 @@ Select the audio stream to use. The default is `0`.
```tsx twoslash
import {AbsoluteFill} from 'remotion';
-import {experimental_Video as Video} from '@remotion/media';
+import {Video} from '@remotion/media';
// ---cut---
export const MyComposition = () => {
diff --git a/packages/docs/docs/video-tags.mdx b/packages/docs/docs/video-tags.mdx
index 18867057d0..9aed3e78b0 100644
--- a/packages/docs/docs/video-tags.mdx
+++ b/packages/docs/docs/video-tags.mdx
@@ -34,7 +34,7 @@ Use the [`useRemotionEnvironment()`](/docs/use-remotion-environment) hook to ren
```tsx twoslash title="OffthreadVideo during preview, @remotion/media during rendering"
import {useRemotionEnvironment, OffthreadVideo, RemotionOffthreadVideoProps} from 'remotion';
-import {experimental_Video as Video, VideoProps} from '@remotion/media';
+import {Video, VideoProps} from '@remotion/media';
const OffthreadWhileRenderingRefForwardingFunction: React.FC<{
offthreadVideoProps: RemotionOffthreadVideoProps;
diff --git a/packages/example/src/NewVideo/NewVideo.tsx b/packages/example/src/NewVideo/NewVideo.tsx
index fed30f146c..1f8e4491b1 100644
--- a/packages/example/src/NewVideo/NewVideo.tsx
+++ b/packages/example/src/NewVideo/NewVideo.tsx
@@ -1,4 +1,4 @@
-import {experimental_Video as NewVideo} from '@remotion/media';
+import {NewVideo} from '@remotion/media';
interface NewVideoProps {
src?: string;
diff --git a/packages/example/src/VideoTesting/index.tsx b/packages/example/src/VideoTesting/index.tsx
index 467a2179ae..0869622245 100644
--- a/packages/example/src/VideoTesting/index.tsx
+++ b/packages/example/src/VideoTesting/index.tsx
@@ -1,4 +1,4 @@
-import {experimental_Video as NewVideo} from '@remotion/media';
+import {Video as NewVideo} from '@remotion/media';
import {
OffthreadVideo,
Sequence,
diff --git a/packages/example/src/VideoTesting/playback.tsx b/packages/example/src/VideoTesting/playback.tsx
index 0ee017c4a2..cca85fd357 100644
--- a/packages/example/src/VideoTesting/playback.tsx
+++ b/packages/example/src/VideoTesting/playback.tsx
@@ -1,4 +1,4 @@
-import {experimental_Video as NewVideo} from '@remotion/media';
+import {Video as NewVideo} from '@remotion/media';
import {
OffthreadVideo,
Sequence,
diff --git a/packages/example/src/VideoTesting/trim.tsx b/packages/example/src/VideoTesting/trim.tsx
index c0fe3d5642..2455e4754d 100644
--- a/packages/example/src/VideoTesting/trim.tsx
+++ b/packages/example/src/VideoTesting/trim.tsx
@@ -1,4 +1,4 @@
-import {experimental_Video as NewVideo} from '@remotion/media';
+import {Video as NewVideo} from '@remotion/media';
import {
OffthreadVideo,
Sequence,
diff --git a/packages/media/src/index.ts b/packages/media/src/index.ts
index 7b7e8dd62d..91df143273 100644
--- a/packages/media/src/index.ts
+++ b/packages/media/src/index.ts
@@ -1,4 +1,15 @@
-export {Audio as experimental_Audio} from './audio/audio';
+import {Audio} from './audio/audio';
+import {Video} from './video/video';
+/**
+ * @deprecated Now just `Audio`
+ */
+export const experimental_Audio = Audio;
+
+/**
+ * @deprecated Now just `Video`
+ */
+export const experimental_Video = Video;
+
export {AudioProps, FallbackHtml5AudioProps} from './audio/props';
export {VideoProps} from './video/props';
-export {Video as experimental_Video} from './video/video';
+export {Audio, Video};