I'm running a website created with create-react-app on localhost on Windows10. When I try to use ffmpeg in my website, I get the error
"SharedArrayBuffer is not defined"
in Firefox. To fix this I seen everywhere that I have to add COOP and COEP headers "in my top document".
The thing is I don't understand what "top document" is and where can I find it.
I tried to add:
<meta http-equiv="Cross-Origin-Embedder-Policy" content="require-corp">
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin">
in my index.html as I seen it somewhere but it is not working.
Could you tell me please what is that document in which I have to add my headers and where to find it?
From the HTML Living Standard, there are only certain values which may be set in the
http-equivattribute of ametatag. These arecontent-language,content-type,default-style,refresh,set-cookie,x-ua-compatible, andcontent-security-policy. Since neitherCross-Origin-Embedder-PolicyorCross-Origin-Opener-Policyappear here, these HTTP headers cannot be set (according to the HTML specification) using thehttp-equivattribute of ametatag. You will need to add these as HTTP headers, rather than asmetatags to your HTML document.