diff --git a/.escheckrc b/.escheckrc index 5cdc1dd4d3..f7bf7779c8 100644 --- a/.escheckrc +++ b/.escheckrc @@ -4,6 +4,7 @@ "not": [ "./dist/libraries/pdf.worker.js", "./dist/libraries/worker-bundle.js", + "./dist/libbitsub.*.js", "./dist/serviceworker.js" ] } diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index 9b4db45281..4a5951b47b 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -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());