🎥 Make videos programmatically with React
Document ProRes cross-origin isolation
Igor Samokhovets5e91bd82683d
diff --git a/packages/docs/docs/mediabunny/formats.mdx b/packages/docs/docs/mediabunny/formats.mdxindex 662d40104f..36a067be05 100644--- a/packages/docs/docs/mediabunny/formats.mdx+++ b/packages/docs/docs/mediabunny/formats.mdx@@ -58,6 +58,8 @@ import {registerProresDecoder} from '@mediabunny/prores';registerProresDecoder();```+For maximum performance, `@mediabunny/prores` uses shared-memory multithreading when the page is [cross-origin isolated](/docs/miscellaneous/cross-origin-isolation). If cross-origin isolation is not enabled, ProRes decoding still works, but falls back to a slower algorithm.+## Audio codecs- `'aac'` - Advanced Audio Coding (AAC)diff --git a/packages/docs/docs/miscellaneous/cross-origin-isolation.mdx b/packages/docs/docs/miscellaneous/cross-origin-isolation.mdxindex 33f61b7549..b1b9a141e7 100644--- a/packages/docs/docs/miscellaneous/cross-origin-isolation.mdx+++ b/packages/docs/docs/miscellaneous/cross-origin-isolation.mdx@@ -12,6 +12,8 @@ A website can either be cross-origin-isolated or not.Enabling cross-origin isolation is required for some web features. For example, the [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) API, which is required for the [`@remotion/whisper-web`](/docs/whisper-web) package to work, is only available in cross-origin isolated pages.+It can also improve performance for packages that can use shared-memory multithreading. For example, [`@mediabunny/prores`](/docs/mediabunny/formats#prores) uses a faster ProRes decoding path when cross-origin isolation is enabled, and falls back to a slower algorithm otherwise.+Cross-origin isolation will put some restrictions on the page as well.For example, HTML5 tags like `<video>` and `<audio>` that load media from a different origin will not work unless they have the `crossorigin="anonymous"` attribute.If those assets then do not support CORS, they will not load at all.@@ -31,7 +33,7 @@ Cross-Origin-Embedder-Policy: credentiallessCross-Origin-Opener-Policy: same-origin```-`credentialless` is preferred over `require-corp` because it still enables `SharedArrayBuffer` while allowing cross-origin resources (images, videos, audio) to load without requiring them to send `Cross-Origin-Resource-Policy` headers. The tradeoff is that cross-origin requests are made without credentials (cookies, HTTP authentication).+`credentialless` is preferred over `require-corp` because it still enables `SharedArrayBuffer` while allowing cross-origin resources (images, videos, audio) to load without requiring them to send `Cross-Origin-Resource-Policy` headers. The tradeoff is that cross-origin requests are made without credentials (cookies, HTTP authentication). `credentialless` is not supported in Safari, so use `require-corp` if you need cross-origin isolation there.If you need credentials for cross-origin resources, use `require-corp` instead: