Skip to content

Commit cb5f550

Browse files
Arcus92kevgrig
authored andcommitted
Backport pull request jellyfin#6291 from jellyfin-web/release-10.10.z
Update dependency libpgs to v0.8.0 Original-merge: 22ae941 Merged-by: thornbill <[email protected]> Backported-by: Joshua M. Boniface <[email protected]>
1 parent ccce4c6 commit cb5f550

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"jquery": "3.7.1",
107107
"jstree": "3.3.17",
108108
"libarchive.js": "2.0.2",
109-
"libpgs": "0.6.0",
109+
"libpgs": "0.8.0",
110110
"lodash-es": "4.17.21",
111111
"markdown-it": "14.1.0",
112112
"material-design-icons-iconfont": "6.7.0",

src/plugins/htmlVideoPlayer/plugin.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,8 @@ export class HtmlVideoPlayer {
13391339
video: videoElement,
13401340
subUrl: getTextTrackUrl(track, item),
13411341
workerUrl: `${appRouter.baseUrl()}/libraries/libpgs.worker.js`,
1342-
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000
1342+
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
1343+
aspectRatio: this._currentAspectRatio === 'auto' ? 'contain' : this._currentAspectRatio
13431344
};
13441345
this.#currentPgsRenderer = new libpgs.PgsRenderer(options);
13451346
});
@@ -2089,6 +2090,14 @@ export class HtmlVideoPlayer {
20892090
mediaElement.style['object-fit'] = val;
20902091
}
20912092
}
2093+
const pgsRenderer = this.#currentPgsRenderer;
2094+
if (pgsRenderer) {
2095+
if (val === 'auto') {
2096+
pgsRenderer.aspectRatio = 'contain';
2097+
} else {
2098+
pgsRenderer.aspectRatio = val;
2099+
}
2100+
}
20922101
this._currentAspectRatio = val;
20932102
}
20942103

0 commit comments

Comments
 (0)