Skip to content
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

Chrome extension no longer works #1

Open
ZarcoV opened this issue Jul 25, 2021 · 7 comments
Open

Chrome extension no longer works #1

ZarcoV opened this issue Jul 25, 2021 · 7 comments

Comments

@ZarcoV
Copy link

ZarcoV commented Jul 25, 2021

Unfortunately this chrome extension no longer works and now also throws the Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined error.

I've been trying to build a chrome extension using locally stored ffmpegwasm files and came across this example, but sadly it doesn't seem to be supported anymore. I've attempted to run the ffmpeg.min,js and the core in chrome's extension sandbox as well, but this didn't make any difference.

Would it be possible to create a new example extension demonstrating how to do this without encountering the SharedArrayBuffer problem?

@ddenis1994
Copy link

hi, I am trying to use this example and also having trouble ...
have you found a solution for running FFmpeg inside the chrome extension?

@zheoreh
Copy link

zheoreh commented Mar 15, 2022

The Same issue
Screenshot 2022-03-15 at 23 37 06

@jeromewu please help us)

It looks like this is the issue.
Screenshot 2022-03-16 at 21 26 34

@brunoluiz
Copy link

brunoluiz commented Mar 16, 2022

SharedArrayBuffer is indeed a pain... But they do work, although you will need to do some manual tweaks: https://brunoluiz.net/blog/2022/jan/gif-sane-playback-control-ffmpegwasm/

An example of working extension (so far): https://github.com/brunoluiz/gifsane-extension

Bear in mind as well that Google is blocking any new Manifest V2 extension in their store and, so far, Manifest V3 doesn't properly support WASM (seems to be in the canary version tho). https://bugs.chromium.org/p/chromium/issues/detail?id=1173354

@zheoreh
Copy link

zheoreh commented Mar 17, 2022

@brunoluiz so there is no way to implement it within an extension and it requires a separate sever (website) to perform the conversion...

@brunoluiz
Copy link

It works on Chrome, as far you:

  1. Use the correct CSP policies
  2. Use manifest v2

If I recall correctly, manifest v3 will not allow you do run remote scripts. Hosting somewhere else is not going to be an option.

If you follow the post and the GIFSane repository, you should be able to have a working extension.

Manifest V3 adds another complication as well: background workers need to be service workers. It seems ffmpegwasm uses some non-service-worker compatible APIs, which will lead to issues in the future.

@zheoreh
Copy link

zheoreh commented Mar 17, 2022

I mean "so there is no way to implement it within an extension and" publish the one to the web store

@zheoreh
Copy link

zheoreh commented Mar 17, 2022

@brunoluiz but I still don't understand how to resolve the issue with CSP policies in this application (ffmpeg.wasm Chrome Extension). Can you please fork this repository and implement a fix?

jim60105 added a commit to jim60105/AIChatAssistant that referenced this issue Mar 7, 2023
This commit is a not working version.
For the issue, check ffmpegwasm/chrome-extension-app#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants