Conditionally prewarm libbitsub workers and exclude module-worker glue asset from the ES5 syntax scan

This commit is contained in:
altqx
2026-08-01 23:05:04 +07:00
parent 6a502be3ca
commit 1f6825154c
2 changed files with 6 additions and 3 deletions
+1
View File
@@ -4,6 +4,7 @@
"not": [
"./dist/libraries/pdf.worker.js",
"./dist/libraries/worker-bundle.js",
"./dist/libbitsub.*.js",
"./dist/serviceworker.js"
]
}
+5 -3
View File
@@ -507,9 +507,11 @@ export class HtmlVideoPlayer {
if (options.resetSubtitleOffset !== false) this.resetSubtitleOffset();
void import('libbitsub')
.then(({ warmup }) => warmup())
.catch((error) => console.warn('[libbitsub] worker prewarm failed; renderer fallback will be used', error));
if (appSettings.get('subtitlerenderpgs') === 'true') {
void import('libbitsub')
.then(({ warmup }) => warmup())
.catch((error) => console.warn('[libbitsub] worker prewarm failed; renderer fallback will be used', error));
}
const elem = await this.createMediaElement(options);
this.#applyAspectRatio(options.aspectRatio || this.getAspectRatio());