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

This commit is contained in:
altqx committed 2026-08-01 23:05:04 +07:00
1 parent 6a502be3ca
commit 1f6825154c
2 files changed
+6 -3

No files matched your search

+1
View File
@@ -4,6 +4,7 @@
"not": [ "not": [
"./dist/libraries/pdf.worker.js", "./dist/libraries/pdf.worker.js",
"./dist/libraries/worker-bundle.js", "./dist/libraries/worker-bundle.js",
"./dist/libbitsub.*.js",
"./dist/serviceworker.js" "./dist/serviceworker.js"
] ]
} }
+5 -3
View File
@@ -507,9 +507,11 @@ export class HtmlVideoPlayer {
if (options.resetSubtitleOffset !== false) this.resetSubtitleOffset(); if (options.resetSubtitleOffset !== false) this.resetSubtitleOffset();
void import('libbitsub') if (appSettings.get('subtitlerenderpgs') === 'true') {
.then(({ warmup }) => warmup()) void import('libbitsub')
.catch((error) => console.warn('[libbitsub] worker prewarm failed; renderer fallback will be used', error)); .then(({ warmup }) => warmup())
.catch((error) => console.warn('[libbitsub] worker prewarm failed; renderer fallback will be used', error));
}
const elem = await this.createMediaElement(options); const elem = await this.createMediaElement(options);
this.#applyAspectRatio(options.aspectRatio || this.getAspectRatio()); this.#applyAspectRatio(options.aspectRatio || this.getAspectRatio());