web/libav: allow passing options to init

This commit is contained in:
wukko 2025-02-02 01:53:59 +06:00
parent 19a342457b
commit 945f87d93b
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -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'
});
}