Vencord icon indicating copy to clipboard operation
Vencord copied to clipboard

fix(VoiceMessages): Make Chrome record audio as ogg

Open waresnew opened this issue 1 year ago • 3 comments

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)

waresnew avatar Mar 27 '24 22:03 waresnew

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

Vendicated avatar Apr 03 '24 12:04 Vendicated

Oh ok, so does that mean it's fine to import from unpkg in this case?

waresnew avatar Apr 03 '24 13:04 waresnew

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

lewisakura avatar Apr 16 '24 09:04 lewisakura

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

waresnew avatar May 18 '24 15:05 waresnew