ffmpegwasm / ffmpegwasm/ffmpeg.wasm
Because your site has the Cross-Origin Embedder Policy enabled, each embedded iframe must also specify this policy
- Dominant language
- C
- Stars
- 17.8k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Next.js 13 app deployed using Amplify: https://main.d2hzcewjwit905.amplifyapp.com
When trying to convert a file, a request is made to https://main.d2hzcewjwit905.amplifyapp.com/_next/static/chunks/795.ceab62a43c56068c.js which gives the following error:

I'm not sure how to resolve this. I have set `Cross-Origin-Embedder-Policy` to `require-corp` for all paths in `next.config.js` (unless `source: "/(.*)"` doesn't match all paths? I tried `source: "/"` too and got the same issue).
```
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
{
key: "Access-Control-Allow-Origin",
value: "*",
},
],
},
];
},
```
The source code for my project which includes my `next.config.js` file can be found here: https://github.com/CrypticSignal/av-converter-amplify
### Reproduction steps
1. Go to https://main.d2hzcewjwit905.amplifyapp.com
2. Open devtools and go to the network tab
3. Try to convert a file
4. After a few seconds, you should see a request being made to https://main.d2hzcewjwit905.amplifyapp.com/_next/static/chunks/795.ceab62a43c56068c.js and the error in the screenshot above.
- **OS:** Windows 11
- **Browser:** Chrome v117.0.5938.149 (Official Build) (64-bit)
Contributor guide
Assessment
This issue has not been assessed yet.