Closed soamsy closed 2 years ago
Getting rid of multi-threading makes recording up to 3x longer depending on the flashcard you're creating. I'm going to try to avoid this if at all possible.
Decided to try again at this from scratch, and the problems I was running into appear to be resolved in the more recent versions of Chromium. I get no warnings that I'm not opting into cross-origin isolation, and Manifest V3 supports a 'wasm-unsafe-eval' option now. I had to work around some unsafe-eval problems with Vue.js, but now that those instances are gone, it'll hopefully be easier to audit the extension whenever I submit it to the Chrome Web Store.
Manifest V3 is google's new spec for the manifest.json that extensions have, and I want to update. My main reason is that it supports specifying cross-origin isolation, which if I don't opt into, will cause the extension to stop working due to Chrome's eventual ban on SharedArrayBuffer. https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/
I tested what would happen if I updated to V3, and there's issues:
This sounds like what I'm running into, since all the SharedArrayBuffer magic is happening on a WebWorker which was loaded from an iframe. It's not clear if Google intends to fix this later, but if they don't AND ban SharedArrayBuffer for me, I may have to look into getting rid of SharedArrayBuffer. It's only used by ffmpeg for multi-threaded speed improvements, but I don't know if I really need it since I'm just recording a slice of audio and taking a screenshot, which shouldn't be that slow on a single thread.