-
-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your browser doesn't support SharedArrayBuffer #102
Comments
This is an expected result as Firefox doesn't have the full support for SharedArrayBuffer now. |
Doesn't it? MDN says it requires After some research I have concluded that the headers necessary for this can't be set via <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin" />
<meta http-equiv="Cross-Origin-Embedder-Policy" content="require-corp" /> and you can't set headers on https://github.io directly. |
So do you mean that if I set up my own server, it is possible to run ffmpeg.wasm in Firefox 81+? |
Should work. I just tested it with the following and it worked: const express = require('express');
const app = express();
app.use((req, res, next) => {
res.header('Cross-Origin-Opener-Policy', 'same-origin');
res.header('Cross-Origin-Embedder-Policy', 'require-corp');
next();
});
app.use(express.static('build'));
app.listen(8080); The downside it that you can't use scripts hosted on other domains, |
Thanks for sharing, also worked here on customization of webpack-dev-server: module.exports = {
mode: 'development',
devServer: {
// webpack-dev-server middleware
before(app) {
// ========================================================
// use proper headers for SharedArrayBuffer on Firefox
// see https://github.com/ffmpegwasm/ffmpeg.wasm/issues/102
// ========================================================
app.use((req, res, next) => {
res.header('Cross-Origin-Opener-Policy', 'same-origin');
res.header('Cross-Origin-Embedder-Policy', 'require-corp');
next();
});
// etc.. |
Setting headers both in |
The header issue in Firefox is also coming to Chrome: https://blog.chromium.org/2021/02/restriction-on-sharedarraybuffers.html |
Would this work combined with Content Security Policies? |
From: https://ffmpegwasm.github.io/#demo
Using Firefox 81.02 on Fedora 32.
Your browser doesn't support SharedArrayBuffer, thus ffmpeg.wasm cannot execute. Please use latest version of Chromium or any other browser supports SharedArrayBuffer.
The text was updated successfully, but these errors were encountered: