chrome-extension-app
chrome-extension-app copied to clipboard
Chrome extension no longer works
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?
hi, I am trying to use this example and also having trouble ... have you found a solution for running FFmpeg inside the chrome extension?
The Same issue
@jeromewu please help us)
It looks like this is the issue.
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
@brunoluiz so there is no way to implement it within an extension and it requires a separate sever (website) to perform the conversion...
It works on Chrome, as far you:
- Use the correct CSP policies
- 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.
I mean "so there is no way to implement it within an extension and" publish the one to the web store
@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?