Skip to content

Commit

Permalink
Backport pull request jellyfin#6291 from jellyfin-web/release-10.10.z
Browse files Browse the repository at this point in the history
Update dependency libpgs to v0.8.0

Original-merge: 22ae941

Merged-by: thornbill <[email protected]>

Backported-by: Joshua M. Boniface <[email protected]>
  • Loading branch information
Arcus92 authored and joshuaboniface committed Nov 19, 2024
1 parent 1c69ad4 commit c3d7401
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
14 changes: 7 additions & 7 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 @@ -106,7 +106,7 @@
"jquery": "3.7.1",
"jstree": "3.3.17",
"libarchive.js": "2.0.2",
"libpgs": "0.6.0",
"libpgs": "0.8.0",
"lodash-es": "4.17.21",
"markdown-it": "14.1.0",
"material-design-icons-iconfont": "6.7.0",
Expand Down
11 changes: 10 additions & 1 deletion src/plugins/htmlVideoPlayer/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,8 @@ export class HtmlVideoPlayer {
video: videoElement,
subUrl: getTextTrackUrl(track, item),
workerUrl: `${appRouter.baseUrl()}/libraries/libpgs.worker.js`,
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
aspectRatio: this._currentAspectRatio === 'auto' ? 'contain' : this._currentAspectRatio
};
this.#currentPgsRenderer = new libpgs.PgsRenderer(options);
});
Expand Down Expand Up @@ -2089,6 +2090,14 @@ export class HtmlVideoPlayer {
mediaElement.style['object-fit'] = val;
}
}
const pgsRenderer = this.#currentPgsRenderer;
if (pgsRenderer) {
if (val === 'auto') {
pgsRenderer.aspectRatio = 'contain';
} else {
pgsRenderer.aspectRatio = val;
}
}
this._currentAspectRatio = val;
}

Expand Down

0 comments on commit c3d7401

Please sign in to comment.