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-equiv
attribute of ameta
tag. These arecontent-language
,content-type
,default-style
,refresh
,set-cookie
,x-ua-compatible
, andcontent-security-policy
. Since neitherCross-Origin-Embedder-Policy
orCross-Origin-Opener-Policy
appear here, these HTTP headers cannot be set (according to the HTML specification) using thehttp-equiv
attribute of ameta
tag. You will need to add these as HTTP headers, rather than asmeta
tags to your HTML document.