[Guide/Feature] Fully working MV3 Chrome Extension implementation (Bypassing Worker CSP, Blob issues & exit(0) crash) #935
CNCmaisdeMILL
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/CNCmaisdeMILL/jonathas-ffmpeg-mv3-blueprint.git
Is your feature request related to a problem? Please describe.
Developing Chrome Extensions using Manifest V3 (MV3) with
ffmpeg.wasmis currently a nightmare for many developers. The strict Content Security Policy (CSP) in MV3 completely blocks the creation of Web Workers viablob:URLs, which breaks the standard@ffmpeg/ffmpegwrapper.Furthermore, even when trying to use
@ffmpeg/core-stinside an Offscreen Document, developers hit three major walls:Program terminated with exit(0)being thrown as a fatal error, crashing the JS execution despite the successful conversion.Describe the solution you'd like
We would like to propose adding an Official MV3 Chrome Extension Guide to the documentation, featuring a "Direct Core Injection" method.
By bypassing the wrapper and interacting directly with the C++ core (
ccall), we can execute FFmpeg synchronously in an Offscreen Document without triggering any CSP violations, Worker blocks, or memory leaks.Here is the bulletproof implementation we successfully built and tested for MV3:
Proposed Implementation Guide (Code Snippet)
1. Load the core safely (No Blobs):
Instead of using
load(), inject the raw single-thread script directly into the DOM of theoffscreen.html.Beta Was this translation helpful? Give feedback.
All reactions