fix(VoiceMessages): Make Chrome record audio as ogg
Fixes #1512
Works on Chrome extension + Chrome userscript
I ended up having to import the web worker file from unpkg because I was having trouble with bundling it into the userscript (Worker constructor needs a URL so I tried storing a blob of the entire file in the userscript, but that increased size by 70%)
Let me know if you prefer not fetching from unpkg (I tried bundling the encoderworker.min.js into the third-party folder and it worked for the extension but idk how to do it for userscript)
I tried bundling the encoderworker.min.js into the third-party folder and it worked for the extension but idk how to do it for userscript
you can't. userscripts are single files
Oh ok, so does that mean it's fine to import from unpkg in this case?
If it can be lazy-loaded remotely and it's genuinely that large then set it up as a dynamically loaded dependency similar to rnnoise: https://github.com/Vendicated/Vencord/blob/main/src/utils/dependencies.ts
If it can be lazy-loaded remotely and it's genuinely that large then set it up as a dynamically loaded dependency similar to rnnoise: https://github.com/Vendicated/Vencord/blob/main/src/utils/dependencies.ts
it was already lazy-loaded because i only load it if the plugin's enabled
i moved the url to dependencies.ts though bc i think that's the convention