Skip to content

Commit 7eaafd1

Browse files
committed
docs: update crossOrigin description
1 parent e58cf33 commit 7eaafd1

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

packages/docs/docs/media/audio.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const MyComposition = () => {
172172

173173
### `crossOrigin?`
174174

175-
Corresponds to the [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#attr-crossorigin) attribute of the underlying `<audio>` element used when `<Audio>` falls back to HTML5 audio rendering. Set this to `'anonymous'` or `'use-credentials'` when loading media from another domain that requires CORS.
175+
Controls the CORS mode when the audio is fetched. Set to `'anonymous'` or `'use-credentials'` to pass the corresponding [`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#credentials) options.
176176

177177
```tsx twoslash title="Loading a remote audio file with CORS enabled"
178178
import {AbsoluteFill} from 'remotion';
@@ -181,10 +181,7 @@ import {Audio} from '@remotion/media';
181181
export const MyComposition = () => {
182182
return (
183183
<AbsoluteFill>
184-
<Audio
185-
src="https://remotion.media/audio.wav"
186-
crossOrigin="anonymous"
187-
/>
184+
<Audio src="https://remotion.media/audio.wav" crossOrigin="anonymous" />
188185
</AbsoluteFill>
189186
);
190187
};

packages/docs/docs/media/video.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const MyComposition = () => {
160160

161161
### `crossOrigin?`
162162

163-
Corresponds to the [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin) attribute of the underlying `<video>` element used when `<Video>` falls back to HTML5 video rendering. Set this to `'anonymous'` or `'use-credentials'` when loading media from another domain that requires CORS.
163+
Controls the CORS mode when the video is fetched. Set to `'anonymous'` or `'use-credentials'` to pass the corresponding [`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#credentials) options.
164164

165165
```tsx twoslash title="Loading a remote video with CORS enabled"
166166
import {AbsoluteFill} from 'remotion';
@@ -169,10 +169,7 @@ import {Video} from '@remotion/media';
169169
export const MyComposition = () => {
170170
return (
171171
<AbsoluteFill>
172-
<Video
173-
src="https://remotion-website-static-files.s3.eu-central-1.amazonaws.com/BigBuckBunny.mp4"
174-
crossOrigin="anonymous"
175-
/>
172+
<Video src="https://remotion-website-static-files.s3.eu-central-1.amazonaws.com/BigBuckBunny.mp4" crossOrigin="anonymous" />
176173
</AbsoluteFill>
177174
);
178175
};

0 commit comments

Comments
 (0)