1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #6291 from Arcus92/pgs-fix-position

Update dependency libpgs to v0.8.0
This commit is contained in:
Bill Thornton 2024-11-04 12:24:10 -05:00 committed by GitHub
commit 22ae941a9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 9 deletions

View file

@ -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);
});
@ -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;
}