From 945f87d93ba04a0e544595ec08f0b624b4dbb0d2 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 2 Feb 2025 01:53:59 +0600 Subject: [PATCH] web/libav: allow passing options to init --- web/src/lib/libav.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/src/lib/libav.ts b/web/src/lib/libav.ts index 6beac0c5..fc158934 100644 --- a/web/src/lib/libav.ts +++ b/web/src/lib/libav.ts @@ -15,10 +15,14 @@ export default class LibAVWrapper { this.onProgress = onProgress; } - init() { + init(options?: LibAV.LibAVOpts) { + if (!options) options = { + yesthreads: true, + } + if (this.concurrency && !this.libav) { this.libav = LibAV.LibAV({ - yesthreads: true, + ...options, base: '/_libav' }); }