Skip to content

Commit

Permalink
Updated libpgs to add web-worker support for PGS rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcus92 committed Jun 13, 2024
1 parent b01e03c commit 3425c2f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
31 changes: 7 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"jquery": "3.7.1",
"jstree": "3.3.16",
"libarchive.js": "1.3.0",
"libpgs": "0.2.1",
"libpgs": "0.3.1",
"lodash-es": "4.17.21",
"markdown-it": "14.1.0",
"material-design-icons-iconfont": "6.7.0",
Expand Down
1 change: 1 addition & 0 deletions src/plugins/htmlVideoPlayer/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,7 @@ export class HtmlVideoPlayer {
const options = {
video: videoElement,
subUrl: getTextTrackUrl(track, item),
workerUrl: `${appRouter.baseUrl()}/libraries/libpgs.worker.js`,
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000
};
this.#currentPgsRenderer = new libpgs.PgsRenderer(options);
Expand Down
3 changes: 2 additions & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const Assets = [
'@jellyfin/libass-wasm/dist/js/subtitles-octopus-worker.js',
'@jellyfin/libass-wasm/dist/js/subtitles-octopus-worker.wasm',
'@jellyfin/libass-wasm/dist/js/subtitles-octopus-worker-legacy.js',
'pdfjs-dist/build/pdf.worker.js'
'pdfjs-dist/build/pdf.worker.js',
'libpgs/dist/libpgs.worker.js'
];

const LibarchiveWasm = [
Expand Down

0 comments on commit 3425c2f

Please sign in to comment.